[Eric] extending the Editor

Albert Zeyer albert.zeyer at rwth-aachen.de
Sun Sep 14 14:48:27 BST 2008


Hi,

Am 13.09.2008 um 17:45 schrieb Detlev Offenbach:

> On Samstag, 13. September 2008, Albert Zeyer wrote:
>> Am 13.09.2008 um 16:59 schrieb Detlev Offenbach:
>>> On Samstag, 13. September 2008, Albert Zeyer wrote:
>>>> Hi,
>>>>
>>>> I am planning to extend the editor. I am thinking of some advanced
>>>> autocompletion features that can be used while you develop the
>>>> application.
>>>
>>> There is already an enhanced autocompletion provider around. It is
>>> the eric4
>>> Assistant plugin. Maybe that does what you are looking for.
>>
>> I tried that but it is not working correctly. I have the following
>> example code:
>>
>>
>> import sys
>> import time
>>
>> x = 1
>> while True:
>> 	time.sleep(1)
>> 	x = x + 1
>> 	print "Hallo, x =", x
>>
>> And I tried to write "time." and I was expecting a calltip coming up.
>> There was something coming up very fast but it closed immediatly  
>> again.
>
> Did you configure the APIs to be used correctly? (Configuration  
> Dialog,
> Editor->APIs)
>

No, thanks, I missed that. I added the Python 2.5 API now and it seems  
to work particulary.

I can type "sys." now and it lists all the members of that module.  
Though, when I type "sys.stdout." for example, I does not list any  
members of the stdout stream.


>>
>> I have tried both the 1.0.2 and 1.1.0 of the Assistant plugin.
>>
>> It does work though in the Shell.
>>
>> Is the Assistant plugin only working in the Shell or should it also
>> work in the editor?
>
> It only works in the editor. The shell uses it's own completion  
> provided by
> the running python shell.
>

Ah OK. It seems that the auto completion in the shell works better  
than in the editor. That is probably because the shell has all the  
runtime information about all objects. Can I use the same auto  
completion somehow in the code (while the application is running)?

Thanks again,
Albert



More information about the Eric mailing list