[IPython-dev] Tab-completion of data/properties and win32com fix for IPython

Jaco Schieke ipython at ml.schieke.net
Mon Aug 2 18:37:43 CDT 2004


Fernando,

I see though that the regexp line:
     m = re.match(r"(\S+(\.\w+)*)\.(\w*)$", text)
in FlexCompleter is not incorporated into rlcompleter for python 2.3.

The original reason for changing this from the vanilla rlcompleter was 
to allow for completions on arrays and other funny things, e.g. 
"".<tab>.  I was involved in this but took a 2 year leave of absence 
;-).  I read some comments (after posting here) on sourceforge on the 
original patch submitted for rlcompleter though and there are issues 
with arbitrary code execution 
(https://sourceforge.net/tracker/?func=detail&aid=547176&group_id=5470&atid=305470). 


Having said all of this ... I not quite sure what the solution is.  For 
the while being, I like typing as little as possible & living on the 
edge - so I'll stick with FlexCompleter.

Regards,

Jaco

Fernando Perez wrote:

> Jaco Schieke wrote:
>
>> I had some issues trying to get tab-completion working with COM 
>> objects' properties in Window$ using the win32com module & IPython 
>> and have been able to get things working with help from the 
>> python-win32 list.  I'm reposting the solution on here for inclusion 
>> if it makes sense into IPython.  The best place to fix this would 
>> however be in python's rlcompleter.py and not IPython's 
>> FlexCompleter.py, but previous requests to fix rlcompleter.py have 
>> gone unheeded - and this one's got an even lower chance as it is 
>> win32 specific.
>
>
> Well, unfortunately there's no point in accepting your patch: 
> FlexCompleter is slated for removal from ipython soon.  FlexCompleter 
> was really just a copy of rlcompleter from python 2.1, back when 
> rlcompleter did not support arbitrary namespaces.  But my patch to 
> rlcompleter got accepted into mainline, so there really is no need 
> anymore for FlexCompleter, which is now a copy of the official 
> rlcompleter.
>
> It's actually just a matter of my having been lazy that it's still 
> around, since I should have removed it a while back (when 2.2 became a 
> requirement for ipython -- I don't really remember when this happened).
>
> Sorry to break these bad news to you.  As you say, the proper place 
> for this fix is really in rlcompleter proper, so perhaps you could 
> continue pounding on their door until at least you get a response.  
> That's how I got the patch which made FlexCompleter accepted into the 
> official rlcompleter.
>
> Regards,
>
> f
>
>




More information about the IPython-dev mailing list