[IPython-user] checking for qthread
Fernando.Perez at colorado.edu
Tue Nov 15 12:00:50 CST 2005
Frédéric Mantegazza wrote:
> Le Mardi 15 Novembre 2005 15:54, Glen W. Mabey a écrit :
>>Is there some way to check whether ipython was passed the -qthread
>>switch when it was started?
> You can use sys.argv :
> $ > ipython -qthread
> Python 2.3.5 (#2, Aug 30 2005, 15:50:26)
> Type "copyright", "credits" or "license" for more information.
> IPython 0.6.15 -- An enhanced Interactive Python.
> ? -> Introduction to IPython's features.
> %magic -> Information about IPython's 'magic' % functions.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
> In : import sys
> In : sys.argv
> Out: ['/usr/bin/ipython', '-qthread']
> Hope this helps...
That is correct. Note also that the %config magic will print out the entire
internal configuration structure. This variable is available as
__IPYTHON__.rc, so you can also check programatically:
In : __IPYTHON__.rc.qthread
In : __IPYTHON__.rc.gthread
Every single option passed to ipython is available in the rc struct, along
with some additional things.
More information about the IPython-user