[IPython-user] Autocall behaviour
Fernando Perez
Fernando.Perez at colorado.edu
Tue Feb 14 13:00:11 CST 2006
Frédéric Mantegazza wrote:
> Le Lundi 13 Février 2006 19:57, Fernando Perez a écrit :
>
>
>>and SVN trunk similarly behaves correctly for me. Could you repeat the
>>above test for us please? Include a paste of the startup banner so we can
>>see exactly your version info, and also please do this:
>
>
> I'm using the debian testing package ($Revision: 1072 $), and I have the
> same results on your example.
>
> But the behaviour of this feature has changed. I'm using the embedded class.
> Our IPython-based console is used to drive some remote objects, through
> Pyro framework; the user directly uses remote objects of the Pyro server.
>
> But in fact, from IPython side, these are only proxies. So, they do not have
> the remote object methods (like __call__), but dynamically search if the
> asked method is available on the remote object.
>
> So, if IPython changed the way to see if a __call__ method is available, it
> could be the problem. By the past, you might be using a try/except
> statement arround the call. But if now you check *before* calling the
> method if it exists, it does not work anymore.
>
> Could it be the problem ?
Could be. What does
callable(foo)
return for one of your local proxies? That's ultimately what is used to decide:
if (self.rc.autocall
and
(
#only consider exclusion re if not "," or ";" autoquoting
(pre == self.ESC_QUOTE or pre == self.ESC_QUOTE2
or pre == self.ESC_PAREN) or
(not self.re_exclude_auto.match(theRest)))
and
self.re_fun_name.match(iFun) and
callable(oinfo['obj'])) :
#print 'going auto' # dbg
return self.handle_auto(line,continue_prompt,
pre,iFun,theRest,oinfo['obj'])
Cheers,
f
More information about the IPython-user
mailing list