From 8e0fb785705acdbef54939a244ce95a01d96c1ce Mon Sep 17 00:00:00 2001 From: sqlcoder Date: Mon, 7 Jun 2010 19:29:59 +0100 Subject: [PATCH] further refinements to .py -> .pyw and python -> pythonw change --- pyfpdb/fpdb.py | 2 +- run_fpdb.py | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index db9050c7..37491505 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -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.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) diff --git a/run_fpdb.py b/run_fpdb.py index 570b7dc5..e77d789f 100644 --- a/run_fpdb.py +++ b/run_fpdb.py @@ -21,13 +21,10 @@ import sys # sys.path[0] holds the directory run_fpdb.py is in sys.path[0] = sys.path[0]+os.sep+"pyfpdb" +# cd to pyfpdb subdir os.chdir(sys.path[0]) #print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd() -import fpdb - -if __name__ == "__main__": - me = fpdb.fpdb() - me.main() - exit() +os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ) +# first arg is ignored (name of program being run)