From 8e65370027fb7d87039a332ee3d28250178f2786 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 20 Jun 2010 18:09:17 +0200 Subject: [PATCH] make CLI parameters to run_fpdb.py and fpdb.py work again --- pyfpdb/fpdb.py | 4 ++-- run_fpdb.py | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index 7ac8dfec..b518994c 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -26,7 +26,7 @@ sys.stdout.write('fpdb.py has been renamed to fpdb.pyw - now calling fpdb.pyw .. sys.stdout.flush() if os.name=='nt': - os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ) + os.execvpe('pythonw.exe', list(('pythonw.exe', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ) else: - os.execvpe('python', ('python', 'fpdb.pyw', '-r'), os.environ) + os.execvpe('python', list(('python', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ) # first arg is ignored (name of program being run) diff --git a/run_fpdb.py b/run_fpdb.py index dd031403..faafad89 100755 --- a/run_fpdb.py +++ b/run_fpdb.py @@ -16,7 +16,6 @@ #In the "official" distribution you can find the license in #agpl-3.0.txt in the docs folder of the package. - import os import sys @@ -26,9 +25,8 @@ sys.path[0] = sys.path[0]+os.sep+"pyfpdb" os.chdir(sys.path[0]) #print "sys.path[0] =", sys.path[0], "cwd =", os.getcwd() - if os.name=='nt': - os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ) + os.execvpe('pythonw.exe', list(('pythonw.exe', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ) else: - os.execvpe('python', ('python', 'fpdb.pyw', '-r'), os.environ) + os.execvpe('python', list(('python', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ) # first arg is ignored (name of program being run)