I have a python script which I call using python main.py on my terminal. It starts a Qt-GUI which executes properly and terminates when I close the GUI.
However, sometimes the last debug message “over and out” is printed but the script itself does not terminate. Neither ctrl+c, ctrl+d nor ctrl+z have any impact on the execution. It seems to me as if this happens when an exception was thrown inside the program (and caught by the GUI).
I do not know how to debug this since it obviously does not happen in the GUI itself. How do I debug this and find out, what I did wrong?
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
form = MainGui()
form.show()
app.exec_()
print "over and out"
EDIT: It seems to me as if there is some thread still being active in the end. However, I do not explicetely work with thread (I do not know what Qt does internally…). Is there a way to view all running threads in the end?
EDIT2: Oh my f*ing god. The solution simply was restarting my system. Somehow my OS did some crazy stuff and prevented the script from terminating.
The solution simply was restarting my system. Somehow my OS did some crazy stuff and prevented the script from terminating.