[IPython-User] NameError exception handling during automagic on

Saravanan Shanmugham sarvilive@gmail....
Thu Nov 29 12:55:00 CST 2012

I notice %xmode changes this behavior. May be what I am looking %xmode Off

How to customize this behaviour would still be usefull?


On Thu, Nov 29, 2012 at 9:51 AM, Saravanan Shanmugham

> I am using an embedded ipython shell environnment for a Test Development
> and Execution platform that I am developing.
> This includes a set of custom magic commands implemented.
> automagic is on.
> I would like to change or see a more cleaner error message when I try a
> non-existent magic command without a %
> Today I get the following
> sarvi@cnh-nehalem-103|5> asasdasd
> ---------------------------------------------------------------------------
> NameError                                 Traceback (most recent call last)
> /ws/sarvi-sjc/cisco-vm-tools/scripts/tvt in <module>()
> ----> 1 asasdasd
> NameError: name 'asasdasd' is not defined
> sarvi@cnh-nehalem-103|6>
> I want this custom ipython shell to generate a more clean error message
> without the traceback just like if I had done the following
> sarvi@cnh-nehalem-103|6> %asasdasd
> ERROR: Magic function `asasdasd` not found.
> sarvi@cnh-nehalem-103|7>
> This mode/capability may not be perfect for python debugging but would be
> great as general purpose shell. When I would like to switch between the
> existing and the new mode though a magic command toggle when needed.
> How can I achieve that?
> Thanks,
> Sarvi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121129/38029836/attachment.html 

More information about the IPython-User mailing list