Python with prompt

20 August 2008

Ever run a python script in windows and it just doesn't work and doesn't tell you why? This is for when exceptions are thrown but Windows closes your python interpreter, I came up with a shell extension called "open with prompt" where the interpreter sticks around so you can toy around with your python script after it's done. Just run this: [reg file] (for python ver 2.5 installed in default location) The reg file contains (it's really simple, just add -i to the regular running):
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Python.File\shell\Open with prompt] [HKEY_CLASSES_ROOT\Python.File\shell\Open with prompt\command] @="\"C:\\Python25\\python.exe\" -i \"%1\" %*" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell\Open with prompt] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shell\Open with prompt\command] @="\"C:\\Python25\\python.exe\" -i \"%1\" %*"