Initial start page implementation

This commit is contained in:
Marco Pesenti Gritti
2006-06-14 15:01:17 -04:00
parent 4a7aac0e01
commit 3ea146e17c
10 changed files with 4788 additions and 8 deletions
+5 -4
View File
@@ -7,7 +7,8 @@ import pygtk
pygtk.require('2.0')
import gobject
def append_to_python_path(path):
def add_to_python_path(path):
sys.path.insert(0, path)
if os.environ.has_key('PYTHONPATH'):
os.environ['PYTHONPATH'] += ':' + path
else:
@@ -59,13 +60,13 @@ if os.path.isfile(os.path.join(curdir, '__uninstalled__.py')):
print 'Running sugar from current directory...'
else:
print 'Running sugar from ' + basedir + ' ...'
sys.path.insert(0, basedir)
append_to_python_path(basedir)
add_to_python_path(basedir)
add_to_python_path(os.path.join(basedir, 'cut-n-paste'))
console = True
else:
print 'Running the installed sugar...'
append_to_python_path(os.path.expanduser('~/.sugar/activities'))
add_to_python_path(os.path.expanduser('~/.sugar/activities'))
if console:
os.environ['SUGAR_USE_CONSOLE'] = 'yes'