[IPython-User] How to check that a python script is called from ipython and check if qt is enabled
Wed Oct 24 09:52:58 CDT 2012
On Wed, Oct 24, 2012 at 4:07 PM, Thomas Kluyver <email@example.com> wrote:
> On 24 October 2012 14:55, Matthias BUSSONNIER
> <firstname.lastname@example.org> wrote:
> > 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.
> Isn't the --gui option for the kernel to integrate with event loops,
> though? So it should be possible to see it.
Yes, --gui is for event loops as you suggest.
> You can check if IPython is loaded by looking in sys.modules, or
> looking for get_ipython in the builtins. I'm not sure if there's a
> good way to check if you're called from user code in IPython
> (inspecting the stack probably isn't a good way).
> Thank you Thomas will give it a go.
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User