[ANN] Jedi Python Autocomplete in Zeus IDE

jumppanen.jussi at gmail.com jumppanen.jussi at gmail.com
Wed Sep 17 15:49:12 CEST 2014

On Wednesday, September 17, 2014 9:42:16 PM UTC+10, Steven D'Aprano wrote:

> Thank you! 

Thanks goes to the creators of Jedi. They've done an amazing job 
creating that package!

> According to the screen shot there, if you have typed
>     self.balan
> the autocomplete will offer the list:
>     balance
>     close

I'm not seeing that behaviour :?

For example using the coding sample from the link, assume I had this 
code (where | represent the location of the cursor):

    def withdraw(self, amount):

If the Jedi Autocomplete macro is run from the Macros panel (on the 
left hand side) then the only thing that is displayed is a popup list 
is this one item:


Now if the code had been like this:

    def withdraw(self, amount):

Then yes, I get a full list of selections.

> Why does Zeus suggest "close" when I have typed "balan"?

Again I'm not seeing this.

Consider again this case:

    def withdraw(self, amount):

What should happen is as you start typing the list will be filtered
and non matching items removed. So if you had started with the code
above and typed in 'balan' as shown below:

    def withdraw(self, amount):

Once againn only one item would be left in the list and that should 
be the one possible matching value:

When I do this test that is the behaviour I'm seeing. 

Can you replicate the issue at will?

If you are seeing something different it might be some sort of 
timing issue? 

In addition, if you run the same test as above do you get the same 

To run that test all I did was save the code below to the test.py 
file, opened the file in Zeus and then ran the autocomplete macro.

    class BankAccount(object):
        """BankAccount Class.
           This is the bank account class."""
        def __init__(self, initial_balance=0):
            self.initial_balance = initial_balance
        def deposit(self, amount):
            self.balance += amount
        def withdraw(self, amount):
            self.balance -= amount
            self. # << run the test here
        def overdrawn(self):
            return self.balance < 0

Cheers Jussi

More information about the Python-list mailing list