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:
Ari Mudev 2010-10-18 16:37:07 +00:00
parent 151595a042
commit 922a7d5064

View file

@ -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