[python-win32] PythonWin IDE: how to assign a function/code to key F1 etc. ?
Robert
kxroberto at googlemail.com
Thu Apr 30 17:37:48 CEST 2009
Mark Hammond wrote:
> Robert wrote:
>> want to put new functions (short python code) on keys like F1, F12,
>> Ctrl-F1 and other keys.
>> Is there a mechanism/recipe ?
>
>
> Look for the *.cfg files in the pythonwin directory.
>
Thanks.
maybe some of the following stuff is useful for somebody, or for
future PythonWin default:
In attachment a patch for pywin/default.cfg, which does context
(word) sensitive help from editor into Python Help and PythonWin Help
F1 = HelpPy
Ctrl+F1 = HelpPyWin
..
and allows for faster edit-run cycle: running/interacting with
(auto-unindented) selected code lines from editor
Ctrl+K = Interact_SelectedLines
Ctrl+E = ExecGlobal_SelectedLines
( the little patch of scintilla/config.py enables correct line
numbers for traceback and debugging of code in default.cfg )
-
Also CtrlEnter.patch (-> framework/interact.py), which enables
ad-hoc debugging from interactive pane (Ctrl-Enter) into an
interactive statement (without long-winded F5 running into
breakpoints etc). I did not put the code into default.cfg, because
a lot of pre-processing code is shared with normal interactive
statement execution.
Robert
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cfg.patch
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090430/c26cfe43/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CtrlEnter.patch
URL: <http://mail.python.org/pipermail/python-win32/attachments/20090430/c26cfe43/attachment-0001.txt>
More information about the python-win32
mailing list