[IPython-dev] saving/loading py files

Satrajit Ghosh satra at mit.edu
Sat Mar 31 18:50:02 EDT 2012


hi thomas and fernando,

inspect works fine with functions defined in a cell!
%save works fine if the file doesn't already exist
%loadpy works!

thanks very much.

cheers,

satra


On Sat, Mar 31, 2012 at 6:29 PM, Thomas Kluyver <takowl at gmail.com> wrote:

> On 31 March 2012 23:21, Satrajit Ghosh <satra at mit.edu> wrote:
> > (the reason is that the inspect module needs to find the function, so i
> > can't simply define it in a separate cell).
>
> The inspect module should be able to find code in cells, so let us
> know if that doesn't work.
>
> > - is there already some quicker way to achieve this?
>
> The %save magic should do it: %save test.py 1
>
> Thomas
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120331/1c81e2d6/attachment.html>


More information about the IPython-dev mailing list