Hm. Putting this into the ipy_user_conf.py file doesn't seem to have any effect.<br><br>I also tried issuing the following from the IPython prompt:<br><br>In [5]: import IPython<br>In [6]: ip= IPython.ipapi.get()<br>--------------------------------------------------------<br>
AttributeError Traceback (mos<br>AttributeError: 'module' object has no attribute 'ipapi'<br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 3:20 PM, Fernando Perez <span dir="ltr"><<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Tue, Sep 20, 2011 at 9:15 AM, Dr. Phillip M. Feldman<br>
<<a href="mailto:Phillip.M.Feldman@gmail.com">Phillip.M.Feldman@gmail.com</a>> wrote:<br>
><br>
> I would like to define a "magic" that clears the screen. I added the<br>
> following to my ipy_user_conf.py file, to no avail:<br>
><br>
> ip.expose_magic("cls", os.system("cls")<br>
><br>
> Any suggestions will be appreciated.<br>
<br>
<br>
ip.expose_magic("cls", lambda self, s: os.system("cls"))<br>
<br>
should do for ipython 0.10.x that you are using.<br>
<br>
Cheers,<br>
<font color="#888888"><br>
f<br>
</font></blockquote></div><br>