[IPython-User] How to check that a python script is called from ipython and check if qt is enabled

Matthias BUSSONNIER bussonniermatthias@gmail....
Wed Oct 24 08:55:40 CDT 2012


Le 24 oct. 2012 à 14:26, Eleftherios Garyfallidis a écrit :

> Hello all,
> 
> I would like to be able to know from inside a python script if that python script is called from ipython and which ipython options are enabled.

> I am especially interested to know if --gui=qt is used.

Script are run in the kernel that has no notion of what frontend it is attached to. 
You could totally have a kernel that is attached to a notebook, a qtconsole and zmq-console. It does not make any difference for what is run inside. 
It might even be on a different machine. 

You can still access some configuration with 
`get_ipython()`
which will return a handle to the interactive shell and have access to some options. 

But we might be able to help if you tell us what you want to do with more details. 

-- 
Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121024/b919d34e/attachment.html 


More information about the IPython-User mailing list