Python with prompt

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\” %*”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s