[Idle-dev] IDLE Extension - Prompt goes missing

phelix nabble at traction.de
Thu Mar 31 10:01:06 CEST 2011

>> 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
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 me.
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.

>> It works
>> fine but there is one problem I just can't figure out. Whenever I hit
>> enter
>> at the shell a couple of times the interpreter seems to be crashing. The
>> extension still runs fine but the prompt is not comming back. I tried it
>> in
>> both python 2.62 and 3.2. Here is some example code, any suggestion
>> welcome.
>Well, your code is doing a lot of things for which I don't understand the
I should have been a little more verbose. In the update method there are two
example lines for a call I need to do to install the class reference: 

        #self.remote_control("get_the_calltip", "mint")  # this strategy
would require to alter idle-code
        self.remote_control("runcode", "1+1\n") 

With either of them I am having the problem of the disapearing prompt.
Something similiar works fine from within the CodeContext extension so
probably I am missing something here. I will investigate further.

>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.

View this message in context: http://old.nabble.com/IDLE-Extension---Prompt-goes-missing-tp31258787p31284056.html
Sent from the Python - idle-dev mailing list archive at Nabble.com.

More information about the IDLE-dev mailing list