00001 import os, sys
00002
00003 import BasicInfo
00004 Location = BasicInfo.Location
00005
00006 ExtraPaths=[
00007 Location,
00008 os.sep.join((Location, "ThirdParty")),
00009 "/usr/local/ScrumPy",
00010 ]
00011
00012 home =os.getenv("HOME")
00013 if home != None:
00014 ExtraPaths.append(home +"/.ScrumPy")
00015
00016 for path in ExtraPaths:
00017 if not path in sys.path:
00018 sys.path.append(path)
00019
00020
00021 import Model
00022 from Util import Kali
00023
00024 from Model import Param, Conc, Vel,dMet
00025
00026 init=False
00027 gui=None
00028 def Init(TheGui=None):
00029
00030 global gui
00031 global Model
00032 global init
00033
00034 if init:
00035 print "ignore re-init"
00036 else:
00037
00038 if TheGui==None:
00039 gui=Kali.Kali("No GUI")
00040 else:
00041 gui=TheGui
00042 Model.Init(gui)
00043 Model = Model.Model
00044 init=True
00045