sugar-toolkit-gtk3/shell/sugar
2006-08-12 23:35:52 +02:00

37 lines
732 B
Python
Executable File

#!/usr/bin/python
import sys
import os
import pygtk
pygtk.require('2.0')
curdir = os.path.abspath(os.path.dirname(__file__))
sourcedir = os.path.dirname(curdir)
if os.path.isfile(os.path.join(sourcedir, 'sugar/__uninstalled__.py')):
print 'Running sugar from ' + sourcedir + ' ...'
sys.path.insert(0, sourcedir)
else:
print 'Running the installed sugar...'
from sugar import env
env.setup()
from ActivityRegistry import ActivityRegistry
registry = ActivityRegistry()
registry.scan_directory(env.get_activities_dir())
from session.Emulator import Emulator
# FIXE Don't run the emulator on the OLPC
emulator = Emulator()
emulator.start()
from session.Session import Session
session = Session(registry)
session.start()