[IPython-User] Autocomplete in the Notebook

Matthias BUSSONNIER bussonniermatthias@gmail....
Wed Dec 12 07:07:43 CST 2012


Le 12 déc. 2012 à 18:06, Ronen Abravanel a écrit :

> Also:
> 
> >If you want to give a shot at tweaking the regular expressions, please ask, and we will point you how to where they are.
> 
> I'll love to. Where are they?
> 

Tab press logic starts around here :

Python/frontend/html/notebook/static/js/codecell.js  L:123

completer that send the request to the kernel would be 

Python/frontend/html/notebook/static/js/completer.js  L:123

I know there is  piece of code somewhere that strip the part of the line from everything that is between brackets, but I don't find it right now.

I would look at 
Python/frontend/html/notebook/static/js/codecell.js  L:132
> else if ((pre_cursor.substr(-1) === "("|| pre_cursor.substr(-1) === " ") && that.tooltip_on_tab )
which deal with 
>  myfunction( [space]<tab>
show help for function

which is too optimistic 
and triggers on 
from foo import <tab>
-- 
Matthias


> Thanks,
> Ronen.
> 
> 
> On Wed, Dec 12, 2012 at 6:57 PM, Ronen Abravanel <ronena@gmail.com> wrote:
> I did a stupid mistake in the 2nd option:
> In order to present the output of a standard directory, I typed the "/" dir. 
> 
> The real difference is when I'm not stating anything:
> f = open("<TAB>
> 
> the console complete from the current directory, and the notebook dose nothing. But it seems that 
> f = open("./<TAB>
> retrieve options from the current directory. 
> 
> 
> Thanks for the quick replay! 
> 
> Ronen. 
> 
> 
> On Wed, Dec 12, 2012 at 6:25 PM, Matthias BUSSONNIER <bussonniermatthias@gmail.com> wrote:
> 
> It should be a matter of tweaking regular expression to know which should be triggerd.
> 
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121212/9027ab9b/attachment.html 


More information about the IPython-User mailing list