make rename and executes work in linux
This commit is contained in:
+4
-1
@@ -25,5 +25,8 @@ import sys
|
||||
sys.stdout.write('fpdb.py has been renamed to fpdb.pyw - now calling fpdb.pyw ...\n\n')
|
||||
sys.stdout.flush()
|
||||
|
||||
os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ)
|
||||
if os.name=='nt':
|
||||
os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ)
|
||||
else:
|
||||
os.execvpe('python', ('python', 'fpdb.pyw', '-r'), os.environ)
|
||||
# first arg is ignored (name of program being run)
|
||||
|
||||
+5
-1
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#Copyright 2008 Steffen Jobbagy-Felso
|
||||
#This program is free software: you can redistribute it and/or modify
|
||||
@@ -35,7 +36,10 @@ if os.name == 'nt' and sys.version[0:3] not in ('2.5', '2.6') and '-r' not in sy
|
||||
os.environ['PATH'] = tmppath
|
||||
print "Python " + sys.version[0:3] + ' - press return to continue\n'
|
||||
sys.stdin.readline()
|
||||
os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ) # first arg is ignored (name of program being run)
|
||||
if os.name=='nt':
|
||||
os.execvpe('pythonw.exe', ('pythonw.exe', 'fpdb.pyw', '-r'), os.environ) # first arg is ignored (name of program being run)
|
||||
else:
|
||||
os.execvpe('python', ('python', 'fpdb.pyw', '-r'), os.environ) # first arg is ignored (name of program being run)
|
||||
else:
|
||||
print "\npython 2.5 not found, please install python 2.5 or 2.6 for fpdb\n"
|
||||
raw_input("Press ENTER to continue.")
|
||||
|
||||
Reference in New Issue
Block a user