[Patches] [ python-Patches-936169 ] CodeContext - an extension to
show you where you are
SourceForge.net
noreply at sourceforge.net
Wed Apr 21 16:09:31 EDT 2004
Patches item #936169, was opened at 2004-04-16 03:40
Message generated for change (Comment added) made by kbk
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=936169&group_id=5470
Category: IDLE
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Noam Raphael (noamr)
>Assigned to: Kurt B. Kaiser (kbk)
Summary: CodeContext - an extension to show you where you are
Initial Comment:
Have you ever edited a code, and did not know exactly
which block you were closing? Or didn't know exactly
even in which block you were?
This extension solves this problem, by adding a few
lines (3 by default) above the IDLE edit box, which
show you exactly where you are in your code.
For example, you may be editing a code with three
indentation levels (has three tabs on its left), but to
find the reason for this - to find what is the meaning
of your block - you have to scroll upwards a long distance.
CodeContext will add three lines of text above your
edit box, so your editing window will look like this:
----------------------------------
Class MyClass:
def myMethod(self, arg1, arg2): <- auto-updated
if something_happens:
----------------------------------
i += 1
print "hello" <- You
edit here
...
----------------------------------
So you can know that i is incremented by 1, in the
method myMethod of class MyClass, and only if
something_happens.
To make this extension work, you have to put the
attached file, CodeContext.py, in your IDLE directory,
and add these lines to config-extensions.def:
----------------------------------
[CodeContext]
enable=1
numlines=3
bgcolor=LightGray
fgcolor=Black
----------------------------------
A note to KBK: I think this extension can go into the
Python distribution. If you don't like it, or if you
want a testing period, you can put "enable=0" instead
of "enable=1". In this way, most users will not even
know CodeContext exists, but "power users" will be able
to put "enable=1" and have CodeContext if they like it
(- I like it).
Best wishes,
Noam Raphael
----------------------------------------------------------------------
>Comment By: Kurt B. Kaiser (kbk)
Date: 2004-04-21 15:09
Message:
Logged In: YES
user_id=149084
Cool Extension! Thanks!
CodeContext.py 1.1
config-extensions.def 1.13
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=936169&group_id=5470
More information about the Patches
mailing list