Closed
Description
Here are some Windows registry features from Python(x,y) that I find useful, and I propose them for WinPython:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Python.File\shell\Run in interactive mode]
@=""
[HKEY_CLASSES_ROOT\Python.File\shell\Run in interactive mode\command]
@="\"C:\\Program Files\\WinPython-3.4.4.2\\python-3.4.4.amd64\\python.exe\" \"-i\" \"%1\" %*"
[HKEY_CLASSES_ROOT\Python.File\shellex]
[HKEY_CLASSES_ROOT\Python.File\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Run in interactive mode]
@=""
[HKEY_CLASSES_ROOT\Python.NoConFile\shell\Run in interactive mode\command]
@="\"C:\\Program Files\\WinPython-3.4.4.2\\python-3.4.4.amd64\\python.exe\" \"-i\" \"%1\" %*"
[HKEY_CLASSES_ROOT\Python.NoConFile\shellex]
[HKEY_CLASSES_ROOT\Python.NoConFile\shellex\DropHandler]
@="{60254CA5-953B-11CF-8C96-00AA00B8708C}"
Before importing the above file into regedit, register WinPython with the OS. Also, edit the paths for your WinPython installation.
I am not sure if WinPython's register_python.bat already adds the DropHandler since this registry key has been on my PC before I first registered WinPython. It is really handy to drag an input file onto a Python script and then automatically access the input file name with sys.argv[1] in the Python script.