Simple QT in Notebook

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Simple QT in Notebook

I'm looking to put some example QT in a notebook.
The code runs but upon exit it is looking to also exit the python shell that was started.
Basically, I get this error:

An exception has occurred, use %tb to see the full traceback.

SystemExit: 0

To exit: use 'exit', 'quit', or Ctrl-D.

Resetting the kernel clears it but I was wondering if there is a way I can have my code check to see if I'm in a notebook. That way I can send a ctrl-D and it should, hopefully, exit both. Or is there a better way to do this?