IDLE history, Python IDE, and Interactive Python with Vim
Pat
pobrien at orbtech.com
Sat Feb 5 09:22:08 EST 2005
Ashot wrote:
> This is sort of both Python and Vim related (which is why I've posted
to
> both newsgroups).
>
> Python related:
> ----------------------
> I have been frustrated for quite some time with a lack of a history
> command in IDLE (in fact with IDLE in general). Often I'll develop
new
> code at the command line, testing each line as I go. Currently I
have to
> copy and paste, removing outputs and the ">>>" at each line.
> Is it perhaps possible to make some kind of hack to do this (dump a
> command history)?
>
> Idle in general isn't that great IMO, so I was wondering also if
there are
> better alternatives out there? What do people use mostly? I've
tried
> something called pyCrust, but this too didn't have history and some
other
> things I was looking for.
PyCrust is only a shell, not a full-blown IDE, so it likely lacks
things that you were looking for. But it certainly does have history,
multi-line command recall, and cut/paste options with and without the
leading prompts. In fact, the default Copy command (Ctrl+C) strips out
the prompts, and the Copy Plus command (Shift+Ctrl+C) retains the
prompts. If you select the Session tab you'll see the entire command
history, without prompts and without the responses from the Python
interpreter. Here are some other keybindings:
>>> shell.help()
* Key bindings:
Home Go to the beginning of the command or line.
Shift+Home Select to the beginning of the command or line.
Shift+End Select to the end of the line.
End Go to the end of the line.
Ctrl+C Copy selected text, removing prompts.
Ctrl+Shift+C Copy selected text, retaining prompts.
Ctrl+X Cut selected text.
Ctrl+V Paste from clipboard.
Ctrl+Shift+V Paste and run multiple commands from clipboard.
Ctrl+Up Arrow Retrieve Previous History item.
Alt+P Retrieve Previous History item.
Ctrl+Down Arrow Retrieve Next History item.
Alt+N Retrieve Next History item.
Shift+Up Arrow Insert Previous History item.
Shift+Down Arrow Insert Next History item.
F8 Command-completion of History item.
(Type a few characters of a previous command and
press F8.)
Ctrl+Enter Insert new line into multiline command.
Ctrl+] Increase font size.
Ctrl+[ Decrease font size.
Ctrl+= Default font size.
>>>
Hope that helps.
Pat
--
Patrick K. O'Brien
Orbtech http://www.orbtech.com
Schevo http://www.schevo.org
Pypersyst http://www.pypersyst.org
More information about the Python-list
mailing list