[IPython-user] exiting ipshell()
fperez.net at gmail.com
Tue Oct 3 13:59:50 CDT 2006
On 10/3/06, Kumar Golap <tizan.moris at gmail.com> wrote:
> Hi Fernando,
> I'm launching the fork in a script launched from within the
> ipshell()...so basically i want to do what you propose from withing
> the ipython shell...
> The snippet of code below is part of a python function that a user
> will be running inside ipython.
Well, the ipshell instance sees its surrounding namespace, so you can
do this in the ipython embedded instance (I'm assuming the call was
made as 'ipshell()', change accordingly):
In : ipshell.set_dummy_mode(1)
and it won't get called again unless something in the enclosing
program sets the dummy mode back to false. If this is a very common
need for you, you can easily expose a global which wraps this
operation in a shorter call and which hides the name ipshell (which is
an implementation detail) from your users, so they always know they
just need to call
or somesuch in your programs, and the nointeract() function would be:
If I've misunderstood your needs let me know.
More information about the IPython-user