Extending PythonWin
Neil Hodgson
neilh at scintilla.org
Wed Jul 12 07:59:08 EDT 2000
> 2. Make some system so that users could make small scripts/modules
> appear in the menues etc. I`d like to have a code revision system for
> instance, and if there were a simple way of making modules available
> from inside PythonWin, this could be done in a snap. ( For experienced
> programmers that is. ;-> )
You can add items to the Tools menu.
In regedit, find (substituting your version of Python for 1.6)
HKEY_CURRENT_USER\Software\Python 1.6\Python for Win32\Tools Menu
There is a list of numbered keys.
Create a new key one larger than the last.
Change the (Default) value of this key to the name you want as the
command.
Add a "Command" string value to the key.
Edit the value of the Command value to be some arbitrary Python code.
Remember ';' can be used to separate multiple statements.
Start PythonWin and the new command will be present in the Tools menu.
There is also a GUI for this in the Tools Menu pane of the Options Dialog
but it doesn't always work.
Neil
More information about the Python-list
mailing list