Which Python editor has this feature?

Terry Reedy tjreedy at udel.edu
Mon Jan 11 16:21:54 EST 2016


On 1/11/2016 6:04 AM, jfong at ms4.hinet.net wrote:

> I am studying the PyUSB package now as the learning object of how to
> write a Python program in a "formal" way. In those modules, there are
> many comment inserted between codes to explain what it does. It's
> good to the user comprehension, but also easily makes a Class size
> expanded to over 100 lines. Also many Classes has the same named
> method such as __getitem__ etc. When searching a specific name I
> usually have to roll back the screen a few times to find out what
> Class I am looking at. That's really annoy.

IDLE has an optional 'code context' feature that shows header lines that 
have scrolled up off the top of the screen.  This would let you see 
which class you are in,

In current releases, Code Context is configured in the Extensions tab of 
the Settings dialog.  For previous releases after Aug 2014, it was 
configured in the separate Extensions dialog.

The most important setting is the (fixed) number of lines in the context 
box (default 3).  I would like to make the box re-size as needed, so the 
outermost context (like the class statement) is always visible without 
using more screen space than needed.

The context is currently read-only.  Clicking on context lines does 
nothing.  As a result of this thread, I am thinking that clicking on a 
context line should scroll up the main text window to display that line 
at the top (and remove that line and any below from the context box).  I 
*think* that this should be fairly easy.

-- 
Terry Jan Reedy




More information about the Python-list mailing list