[Patches] [ python-Patches-1196946 ] allow using normal indent width in shell in IDLE

SourceForge.net noreply at sourceforge.net
Mon Feb 5 05:30:33 CET 2007


Patches item #1196946, was opened at 2005-05-06 19:26
Message generated for change (Comment added) made by kbk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1196946&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Private: No
Submitted By: Jeff Shute (jshute)
Assigned to: Kurt B. Kaiser (kbk)
Summary: allow using normal indent width in shell in IDLE

Initial Comment:
IDLE currently ignores the indent width setting in the
main shell window, and forces it to use tab characters,
8 spaces wide.  This is ugly, and causes problems when
you write code in the shell and then cut-and-paste it
into a real editor window.

This patch adds an option (off by default) to honour
the indent width setting in the PyShell window rather
than using tabs.  This makes it much nicer to edit
commands that use several levels of indenting.  

The only reason for this to be an option, and for it to
be off by default, is that it looks a little weird when
the second line of code is indented, but still lines up
with the first indented line because the prompt is also
4 characters wide.  Fixing it so this would not look
weird would be nice, but would require a lot of Tk
hacking and might make the gui slower.

----------------------------------------------------------------------

>Comment By: Kurt B. Kaiser (kbk)
Date: 2007-02-04 23:30

Message:
Logged In: YES 
user_id=149084
Originator: NO

Sorry. Doesn't really solve the problem.

----------------------------------------------------------------------

Comment By: Jeff Shute (jshute)
Date: 2005-05-12 00:46

Message:
Logged In: YES 
user_id=39615

Hmm, I had only considered using a continuation of "...". 
Using spaces would make things look mostly right, and will
have odd behaviour only when you cut-and-paste into an
editor, since you will get an extra indentation level, but
that won't cause errors and is easily fixed.

Here is a new patch that implements it this way.  I think
doing it this way solves the problem well enough that the
preference is not necessary.  (Or both patches can be
applied to get this behaviour and the preference.)

----------------------------------------------------------------------

Comment By: Jim Jewett (jimjjewett)
Date: 2005-05-11 19:02

Message:
Logged In: YES 
user_id=764593

Would using a continuation prompt of " "*len(sys.ps1) solve 
the problem?  (standard module) code uses a continuation 
prompt of "... " which gets the spacing right, though it doesn't 
do your indents for you.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1196946&group_id=5470


More information about the Patches mailing list