[IPython-user] Autocall behaviour

Frédéric Mantegazza mantegazza at ill.fr
Thu Feb 16 01:50:10 CST 2006


Le Mardi 14 Février 2006 20:00, Fernando Perez a écrit :

> 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'])

It returns True. I found the problem:

PyMAD at sunceng>>> Spectro
                 <DynamicProxyWithAttrs for 
                 PYRO://sunceng:7770/c239dc1009c10a7e44f1669256fa41d1>

PyMAD at sunceng>>> autocall
Automatic calling is: OFF        <<<<<<<<<<<<<<<<<<<<<<<

PyMAD at sunceng>>> autocall 2
Automatic calling is: Full

PyMAD at sunceng>>> Spectro
---------------> Spectro()
Q           : (1, 0, 0)
Ki          : 4.662 A-1
Kf          : 4.662 A-1
Ei          : 45.04111 meV
Ef          : 45.04111 meV
En          : 0.00000 meV
Pi is undefined
Pf is undefined
Fixed energy: 'transfert'
Drive mode  : 'free'
Flipper beam: 'final'

But I do have 'autocall 2' in my ~/ipython/ipythonrc file (I removed the 
entire dir. before running the new version). The problem is that the 
'autocall' param is not loaded. Changing 'confirm_exit', for example, do 
the job.

-- 
   Frédéric




More information about the IPython-user mailing list