[IPython-user] start ipython from my own script

Gökhan SEVER gokhansever@gmail....
Sat May 30 21:05:27 CDT 2009


Hey Ondrej,

So far this is my temporary solution:

from IPython.Shell import IPShellEmbed
ipshell = IPShellEmbed()
a = 5
ipshell()

do a whos in Ipython you will see a listed there. However I couldn't make
--pylab working in that mode.

Also make sure explicitly typing your variables or results in Ipython, for
some reason which I haven't understood nor explained variables might not get
registered into the current visible namespace...

Gökhan


On Sat, May 30, 2009 at 8:55 PM, Ondrej Certik <ondrej@certik.cz> wrote:

> Hi,
>
> I have a program or script and at one point I would like to start an
> ipython shell and pass all my local/global variables into it, so that
> I can experiment. Importing the whole script in ipython session
> doesn't help, because I want to run ipython at some particular point.
> E.g something like an enhanced version of:
>
> import pdb
> pdb.set_trace()
>
> So far I tried:
>
> import IPython
> ipython = IPython.Shell.start()
> ipython.mainloop()
>
>
> that works, but I don't see the variables from the program. What is
> the best way to do that?
>
> Thanks,
> Ondrej
> _______________________________________________
> IPython-user mailing list
> IPython-user@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20090530/bd83fc98/attachment.html 


More information about the IPython-user mailing list