Wxpython: App Not Exiting When Window Is Closed
My app is not exiting mainloop after closing my application's main window. why is it not printing 'finished' after I close the window? Here is my code: import wx import numpy as np
Solution 1:
You invoked the demons of matplotlib.pyplot
which has its own eventloop.
I can not explain to you why exactly it does not work, but you can resolve it as follows:
Use the fully object-oriented interface of matplotlib when doing more than writing simple scripts (see the wxPython
examples on matplotlib
).
This can be don as follows:
#import matplotlib.pyplot as plt
from matplotlib.figure import Figure
Down below:
self.fig = Figure() # instead of plt.figure()
Post a Comment for "Wxpython: App Not Exiting When Window Is Closed"