[IPython-User] Example similar to "ipython -p physics" for ipython 0.11?

Thomas Kluyver takowl@gmail....
Sun Oct 2 06:40:44 CDT 2011


On 28 September 2011 03:38, Arthur Woll <arthurwoll@cornell.edu> wrote:

> Hi all,
>
> I'm looking for an example of how to use ipython to implement (modest)
> input prefiltering as described in various places for pre-0.11 versions of
> ipython.
>
> For example the old ipthonrc-physics "profile" (loaded using "ipython -p
> physics") allows input such as:
>
> In [1]: a = 10 lb
>
> (Described here:  http://fperez.org/papers/ipython07_pe-gr_cise.pdf)
>
> and translates this to
>
> a = PhysicalQuantityInteractive(10, 'lb')
>
> Any suggestions?
>

Hi Arthur,

I don't think there's anything directly equivalent in 0.11, but you can have
a look at the prefiltering system here:

https://github.com/ipython/ipython/blob/master/IPython/core/prefilter.py

Also, the deprecated module which allowed "a = 10 lb" in older versions can
be seen here:

https://github.com/ipython/ipython/blob/master/IPython/deathrow/PhysicalQInput.py

Hope that helps,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20111002/73f612c8/attachment.html 


More information about the IPython-User mailing list