[Idle-dev] IDLE Extension - Prompt goes missing
taleinat at gmail.com
Thu Mar 31 22:54:11 CEST 2011
On Thu, Mar 31, 2011 at 10:01 AM, phelix wrote:
> >> I am trying to write an extension to add autocompletion for "self".
> >Have you tried adding this functionality to the existing AutoComplete
> >extension? That could save you a lot of work and would be the best way to
> >do it.
> I took a good look at it and also at CodeContext and learned a lot from it.
> But it was easier to put it into its own extension and seemed cleaner to
> Of course the completions show up in AutoComplete. What it does is that it
> simply points a global Reference "self" to the classname(s) it finds in the
> editor above the cursor.
For your own good and for the good of IDLE, I urge you to try implementing
this by improving AutoComplete. Your approach (as I understand it) both
requires first fixing a delicate bug regarding IDLE's event handling and
messes around with the Shell's namespace. I don't think you will manage to
get such a patch accepted.
>The best tip I can give you is to run IDLE from the command line (on
> >Windows, C:\Python32\python.exe C:\Python32\Lib\idlelib\idle.py). Then you
> >can see output and exceptions printed to the command console. You could
> >print your own debugging info using "print" instead of using that s_print
> >function, and it won't show up in IDLE's shell, just in the command
I figured this out by coincidence just after I had posted this question.
> Though it seems very obvious to me know this is a very good hint and should
> by all means be included in the extend.txt file or on some website about
> IDLE Development.
If you submit a patch which updates extend.txt appropriately, I'll review
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IDLE-dev