<div class="gmail_quote">On 28 September 2011 03:38, Arthur Woll <span dir="ltr">&lt;<a href="mailto:arthurwoll@cornell.edu">arthurwoll@cornell.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div><div></div><div class="h5">Hi all,<br>
<br>
I&#39;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.<br>
<br>
For example the old ipthonrc-physics &quot;profile&quot; (loaded using &quot;ipython -p physics&quot;) allows input such as:<br>
<br>
In [1]: a = 10 lb<br>
<br>
(Described here:  <a href="http://fperez.org/papers/ipython07_pe-gr_cise.pdf" target="_blank">http://fperez.org/papers/ipython07_pe-gr_cise.pdf</a>)<br>
<br>
and translates this to<br>
<br>
a = PhysicalQuantityInteractive(10, &#39;lb&#39;)<br>
<br>
Any suggestions?</div></div></blockquote><div><br>Hi Arthur,<br><br>I don&#39;t think there&#39;s anything directly equivalent in 0.11, but you can have a look at the prefiltering system here:<br><br><a href="https://github.com/ipython/ipython/blob/master/IPython/core/prefilter.py">https://github.com/ipython/ipython/blob/master/IPython/core/prefilter.py</a><br>

<br>Also, the deprecated module which allowed &quot;a = 10 lb&quot; in older versions can be seen here:<br><br><a href="https://github.com/ipython/ipython/blob/master/IPython/deathrow/PhysicalQInput.py">https://github.com/ipython/ipython/blob/master/IPython/deathrow/PhysicalQInput.py</a><br>

<br>Hope that helps,<br>Thomas<br></div></div>