Hi!

I wanted to ask if it is possible to determine within a written code if 
this code was started in the current Python/IPython console of Spyder or if 
it was run in a dedicated console.
This makes a difference for Qt-GUI development.


For example, during GUI development phase, I like the interactive shell, as 
it allows me to directly interact with my GUI and its elements.
This however only works if I do NOT start the PyQt event loop at the end 
(sys.exit(app.exec_())   ) 
I guess the only reason this works at all, is because Spyders Console is 
written in Qt as well ;-)
However it is extremely useful during developement as it allows code 
completion, immediate try outs etc.

But if I run the same code in a dedicated shell, the GUI only shows up 
shortly and immediately vanishes, as the eventloop is not running.

So what I am looking for is something like:
  if  not <SpyderfunctionThatTellsMeIRunInSpydersInteractiveConsole>:
    sys.exit(app.exec_())


Dos this exist, or is it possible?
Regards, and thank you :)
Max

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to