[Idle-dev] (auto)-completion problems

Peter Galan petergalan at rogers.com
Fri May 25 08:35:52 EDT 2018


Hello Terry,
	Thank you for a prompt reply. So, I've installed the latest version of the Python 3 (3.6.5) but unfortunately it behaves almost identically. So, my program have the classes and objects and they have attributes, but no auto-completion window appears when I write the object name followed by the dot. I can only force some window to appear (the same as with the Python 2) by pressing the Ctrl+Space, but that window is not related to any of my objects. Apparently it contains all possible generic attributes. Actually I do need to type anything, just to press the Ctrl+Space for that window to appear. The only difference from the Python 2 is, that now I can use at that window and select any item, which then appears in my program. But you mentioned to wait for the next version, 3.7, so I'll wait. But I have another problem/question with the Python 3. With the Python 2 I used the VPython (version 6), which contains a very nice 3D graphics library. Now none of my previous programs (using "visual" modules) don't work of course. So, is there a similar graphical module for the Python 3? Somewhere I read that at first a program (module?) with the name "Anaconda" has to be installed and then VPython will work identically with the Python 3. But I assume that there are some dedicated graphical modules for the Python 3 as well. Can you please advise me? 

Regards,
Peter     

-----Original Message-----
From: Terry Reedy [mailto:tjreedy at udel.edu]
Sent: May-24-18 3:20 PM
To: Peter Galan; idle-dev at python.org
Subject: Re: (auto)-completion problems

On 5/23/2018 9:58 AM, Peter Galan wrote:

> At first I have to thank you for your effort to maintain this great 
> programming system.

Thank you.

> I am using it to attract my grandchildren to the computer programming 
> technique.

Great.  I started my daughter at around 14.

> But I have encountered one
> problem, which is present even in the latest version (2.7.15).

This is the latest maintenance release of an 8-year-old version.  It only gets security and build fixes and a small subset of bug fixes. 
Currently, most bugfixes are not backported to 2.7.  This includes IDLE changes.

3.6 is the current version of Python and 3.7 will be out next month. 
Please consider starting your grandkids with 3.6 or 3.7.  IDLE is being actively improved, but only for 3.6+.

On Windows, 2.7.15 uses tcl/tk GUI framework 8.5.15, whereas Python 3.6 comes with the newer and better tk 8.6.6.

> It is the
> automatic completion. It doesn’t work as described. At first, the 
> automatic completion should kick-out after about 2 sec when, for 
> example the user types the name of an object and the dot. Nothing happens.

Completing a name you have started and adding an attribute after '.' are
2 different operations.  Auto-popup is only for the latter.  If I enter 'int.' in either Shell or an editor, a box pops up with the 7 int attributes that do not start with '_', from 'bit_length' to 'to_bytes'.

I have 64-bit Win 10 and both installed 64-bit and locally built 32-bit debug binaries.  If you do not see the above, there is either a problem with the tcl/tk gui framework, which IDLE uses, on Win 7, or with your particular installation.

A box pops up only if the object has attributes *and* if IDLE knows about them.  The IDLE doc (Help => IDLE Help, and online) section on Completions mentions that in the editor, you likely have run the code already written for completions to work properly.

> The
> forced auto-completion requires to press the Ctrl+Space keys.

This is required if you have already typed part of a name *before* the box appears.

> At first,
> it opens “some” window, but, like in my example, the object “M” must 
> not to be followed by the dot.

Because "M" does not have attributes, at least none that IDLE knows about.

> However that window is meaningless.

On the contrary, this box in the screenshot is exactly as intended, and what I see also upon entering 'M<cntl-space>'.  'MemoryError' is the first visible name beginning with M.

> As soon
> as I try to use it (click on it, to move the cursor keys, or any other 
> activity with the keyboard), this window immediately disappears.

With 2.7.15, I can move with up/down arrow keys and click after moving, but there are some bugs.  Clicking without movement and <Enter> do not work.  These and other problems were fixed last summer for 3.6+.

> Is there a way to fix this problem?

Some of your problems may be with your installation, but a full fix requires upgrading to 3.6+

> And I am running the Windows 7 and the 64-bit version Python. Thank 
> you in advance for your help.

--
Terry Jan Reedy



More information about the IDLE-dev mailing list