[Tutor] IDLE shell indentation?
Alan Gauld
alan.gauld at btinternet.com
Fri Oct 19 09:00:59 CEST 2012
On 19/10/12 03:11, boB Stepp wrote:
>>>> if zero:
> print(zero)
> else:
> print(phrase)
This is a long standing bug/feature of IDLE and gets debated regularly
on the IDLE mailing list.
BTW There is a more feature rich unofficial version of Idle called IdleX
by Roger Serwy here:
http://www.ews.illinois.edu/~serwy/idlex/
which has:
* Terminal-like behavior for PyShell. The cursor is confined to the
prompt and up/down arrow keys navigate the command history, similar to
the original Python interpreter.
* Matplotlib support for interactive figures when using the subprocess.
* Tabbed editor windows with drag'n'drop reordering.
* SubCodes, similar to Matlab cell mode and Sagemath cells, for quick
code prototyping without restarting the shell.
* Integrated reindent.py support.
* Improved code navigation with Code Browser.
* Cython editing and execution support. (Version 0.15.1)
* Line numbers for the Editor.
* Clear PyShell Window without restarting PyShell.
* Simple interface for enabling/disabling extensions.
* SearchBar, Squeezer, and IDLE2HTML included. (Originally by Tal Einat,
Noam Raphael, and Michael Haubenwallner)
But it still has the broken indentation.
The last thread I saw on the topic said:
---------------------
On 06/21/2012 03:39 AM, Alan Gauld wrote:
> On 21/06/12 02:16, Roger Serwy wrote:
>
>> I could write a patch to allow ps2 prompts if there's any serious
interest.
>
> I would love that.
>
> This is one of the most common issues I get from users of my web
tutorial. At least one email per month from beginners confused by IDLEs
indentation.
There is an issue for supporting ps1 and ps2. See
http://bugs.python.org/issue13657
I'll start writing a patch later today.
...
-----------------------
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list