make CLI parameters to run_fpdb.py and fpdb.py work again
Conflicts: pyfpdb/fpdb.py run_fpdb.py
This commit is contained in:
+4
-1
@@ -27,5 +27,8 @@ 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('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ)
|
if os.name=='nt':
|
||||||
|
os.execvpe('pythonw.exe', list(('pythonw.exe', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ)
|
||||||
|
else:
|
||||||
|
os.execvpe('python', list(('python', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ)
|
||||||
# first arg is ignored (name of program being run)
|
# first arg is ignored (name of program being run)
|
||||||
|
|||||||
+4
-3
@@ -15,7 +15,6 @@
|
|||||||
#In the "official" distribution you can find the license in
|
#In the "official" distribution you can find the license in
|
||||||
#agpl-3.0.txt in the docs folder of the package.
|
#agpl-3.0.txt in the docs folder of the package.
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
@@ -25,6 +24,8 @@ sys.path[0] = sys.path[0]+os.sep+"pyfpdb"
|
|||||||
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()
|
||||||
|
|
||||||
|
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', list(('python', 'fpdb.pyw', '-r'))+sys.argv[1:], os.environ)
|
||||||
# first arg is ignored (name of program being run)
|
# first arg is ignored (name of program being run)
|
||||||
|
|||||||
Reference in New Issue
Block a user