Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Closed
Description
Bug report
Bug summary
I can't figure out how to stop the cocoa mainloop once it's going with the macosx backend. This could be a missing API, or just one that I don't know about.
I suspect an API that exposes sending[NSApp stop] is all that's needed, but I'm not sure.
Code for reproduction
importmatplotlibmatplotlib.use('macosx')importmatplotlib.pyplotaspltfrommatplotlib.backends.backend_macosximportTimerMac,showdefstop_mainloop():print("I don't know how to quit you")t.stop()t=TimerMac(2000)t.add_callback(stop_mainloop)t.start()show.mainloop()
Actual outcome
Loop runs forever because I don't know how to stop it.
Matplotlib version
- Operating system: macOS 10.13.2
- Matplotlib version: 2.0.2 (conda-forge)
- Matplotlib backend (
print(matplotlib.get_backend())): MacOSX - Python version: 3.6.1