5f764152c8
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@312 014f5005-505e-4b48-8d0a-63407b615a7c
28 lines
816 B
Python
Executable File
28 lines
816 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
|
|
import sys, os
|
|
|
|
execdir = os.path.dirname(sys.argv[0])
|
|
executable = os.path.join(execdir, "Python")
|
|
resdir = os.path.join(os.path.dirname(execdir), "Resources")
|
|
libdir = os.path.join(os.path.dirname(execdir), "Frameworks")
|
|
mainprogram = os.path.join(resdir, "relational_gui.py")
|
|
|
|
#sys.argv.insert(1, mainprogram)
|
|
#if 0 or 0:
|
|
# os.environ["PYTHONPATH"] = resdir
|
|
# if 0:
|
|
# os.environ["PYTHONHOME"] = resdir
|
|
#else:
|
|
# pypath = os.getenv("PYTHONPATH", "")
|
|
# if pypath:
|
|
# pypath = ":" + pypath
|
|
# os.environ["PYTHONPATH"] = resdir + pypath
|
|
#os.environ["PYTHONEXECUTABLE"] = executable
|
|
#os.environ["DYLD_LIBRARY_PATH"] = libdir
|
|
#os.environ["DYLD_FRAMEWORK_PATH"] = libdir
|
|
#os.execvp("python",(mainprogram,))
|
|
if os.fork() == 0:
|
|
os.execvp("python",("python",mainprogram,))
|