Ideas for projects

Jeff Shannon jeff at ccvcorp.com
Thu Dec 9 15:51:47 EST 2004


Caleb Hattingh wrote:

> Here is something I would try but don't have the guts for:
>
> If you could write an extension to idle (yes, idle, not Boa, not 
> Eric,  etc) that pops up a small list of possible completions in a 
> listbox when  you type a '.' (period) after any object name or module 
> name (including  builtins), that would be *awesome*.  I have been very 
> spoilt by Delphi in  this regard.  Some kind of code that does partial 
> compiles in the  background to analyse code for members would be sweet.


Even duplicating the PythonWin completion code for IDLE would be handy, 
I'd think.  It's not exceptionally smart about finding complete names ,  
but it can still help considerably.  (I think it only looks at imported 
modules, and textual scans of the current file, so it doesn't 
automatically recognize new attributes of class instances, and it 
doesn't always recognize the type of an object (to refer to class def 
for attributes).  But if the current file was previously imported, then 
it'll offer completion for those attributes that existed at the time of 
import...)

Stage one could be to borrow PythonWin's name-finding code, and write a 
UI to use that code in IDLE.  An optional stage two could then be 
rewriting the name-finding code to be smarter.

Jeff Shannon
Technician/Programmer
Credit International




More information about the Python-list mailing list