[IPython-user] Autocall behaviour

Frédéric Mantegazza mantegazza at ill.fr
Thu Feb 16 03:52:09 CST 2006

Le Jeudi 16 Février 2006 10:14, Ville Vainio a écrit :

> On 2/16/06, Frédéric Mantegazza <mantegazza at ill.fr> wrote:
> > PyMAD at sunceng>>> autocall
> > Automatic calling is: OFF        <<<<<<<<<<<<<<<<<<<<<<<
> Note that autocall is a toggle, so it was probably switched it from 1 to
> 0 here.

You are right. In fact, it toggles between OFF and SMART. So, it is loaded 
with 1.

> Something somewhere may be overriding your ipythonrc setting. Try
> setting autocall in another config file, e.g. ipy_user_conf.py:
> import IPython.ipapi
> ip = IPython.ipapi.get()
> o = ip.options()
> o.autocall = 2

How do I use this config file ? I saw there is a 
site-packages/IPython/UserConfig/ipy_user_conf.py, where autocall is set to 
1, but even if I try to set it to 2 there, it remains to SMART when I 
launch IPython...

The man page says that default value for -autocall param is 1. So, are you 
sure that the autocall param is really read from the ipythonrc file ?

> Moving forward, I have in mind a good solution for this (config option
> traceability). Over the weekend, I think I'll add an "electric" mode
> to ipstruct.Struct that allows getting notifications for setattr
> invocations. Then you'll be able to add an observer that saves the
> stack frames from every setattr and you'll see who changes what
> option, and to what value.

Great !


More information about the IPython-user mailing list