First option: (Easiest, recommended)
Open Notepad++. On the menu go to: Run -> Run.. (F5). Type in:
Now, instead of pressing run, press save to create a shortcut for it.
- If you have Python 3.1: type in
-iif you want the command line window to stay open after the script has finished
Use a batch script that runs the Python script and then create a shortcut to that from Notepad++.
As explained here: http://it-ride.blogspot.com/2009/08/notepad-and-python.html
Third option: (Not safe)
The code opens “HKEY_CURRENT_USER\Software\Python\PythonCore”, if the key exists it will get the path from the first child key of this key.
Check if this key exists, and if does not, you could try creating it.