From 922a7d5064a0efc22569043221c49c33558c8740 Mon Sep 17 00:00:00 2001 From: Ari Mudev Date: Mon, 18 Oct 2010 16:37:07 +0000 Subject: [PATCH] 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. --- game/evennia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/evennia.py b/game/evennia.py index 2721322f8..136ba787a 100755 --- a/game/evennia.py +++ b/game/evennia.py @@ -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