Windows fix. Always start twistd.py using a Python interpreter.
This allows .py files to be associated with an editor. Before this fix, twistd.bat simply "started" twistd.py, which would tend to open the file in an editor if the file associations were set. This fix simply prepends the python interpreter path to the twistd.py path when twistd.bat is built programmatically so it is always "run as a python program" no matter the current Windows .py file association.
This commit is contained in:
parent
151595a042
commit
922a7d5064
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ if os.name == 'nt':
|
|||
os.pardir, os.pardir, os.pardir, os.pardir,
|
||||
'scripts', 'twistd.py'))
|
||||
bat_file = open('twistd.bat','w')
|
||||
bat_file.write("@%s %%*" % twistd_path)
|
||||
bat_file.write("@\"%s\" \"%s\" %%*" % (sys.executable, twistd_path))
|
||||
bat_file.close()
|
||||
print """
|
||||
INFO: Since you are running Windows, a file 'twistd.bat' was
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue