further refinements to .py -> .pyw and python -> pythonw change

This commit is contained in:
sqlcoder 2010-06-07 19:29:59 +01:00
parent 1c897e54d5
commit 8e0fb78570
2 changed files with 4 additions and 7 deletions

View File

@ -27,5 +27,5 @@ import sys
sys.stdout.write('fpdb.py has been renamed to fpdb.pyw - now calling fpdb.pyw ...\n\n') sys.stdout.write('fpdb.py has been renamed to fpdb.pyw - now calling fpdb.pyw ...\n\n')
sys.stdout.flush() sys.stdout.flush()
os.execvpe('python.exe', ('python.exe', 'fpdb.pyw', '-r'), os.environ) os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ)
# first arg is ignored (name of program being run) # first arg is ignored (name of program being run)

View File

@ -21,13 +21,10 @@ import sys
# sys.path[0] holds the directory run_fpdb.py is in # sys.path[0] holds the directory run_fpdb.py is in
sys.path[0] = sys.path[0]+os.sep+"pyfpdb" sys.path[0] = sys.path[0]+os.sep+"pyfpdb"
# cd to pyfpdb subdir
os.chdir(sys.path[0]) os.chdir(sys.path[0])
#print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd() #print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd()
import fpdb
os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ)
if __name__ == "__main__": # first arg is ignored (name of program being run)
me = fpdb.fpdb()
me.main()
exit()