Title: can't stop macosx mainloop · Issue #10002 · matplotlib/matplotlib · GitHub
Open Graph Title: can't stop macosx mainloop · Issue #10002 · matplotlib/matplotlib
X Title: can't stop macosx mainloop · Issue #10002 · matplotlib/matplotlib
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...
Open Graph 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 ...
X 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 sus...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10002
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"can't stop macosx mainloop","articleBody":"### Bug report\r\n\r\n**Bug summary**\r\n\r\nI 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.\r\n\r\nI suspect an API that exposes sending `[NSApp stop]` is all that's needed, but I'm not sure.\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib\r\nmatplotlib.use('macosx')\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.backends.backend_macosx import TimerMac, show\r\n\r\ndef stop_mainloop():\r\n print(\"I don't know how to quit you\")\r\n t.stop()\r\n\r\nt = TimerMac(2000)\r\nt.add_callback(stop_mainloop)\r\nt.start()\r\n\r\nshow.mainloop()\r\n```\r\n\r\n**Actual outcome**\r\n\r\nLoop runs forever because I don't know how to stop it.\r\n\r\n\r\n**Matplotlib version**\r\n\r\n * Operating system: macOS 10.13.2\r\n * Matplotlib version: 2.0.2 (conda-forge)\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): MacOSX\r\n * Python version: 3.6.1\r\n\r\n","author":{"url":"https://github.com/minrk","@type":"Person","name":"minrk"},"datePublished":"2017-12-14T15:38:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/10002/matplotlib/issues/10002"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8168a92c-fe43-8a92-e217-4f75c767c854 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB6C:264800:E94C4:12A380:6A52C058 |
| html-safe-nonce | 58c9279b79cc473663c8ece1c9d8b24479102a19f9bf75d6aa9e453164e2b03f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjZDOjI2NDgwMDpFOTRDNDoxMkEzODA6NkE1MkMwNTgiLCJ2aXNpdG9yX2lkIjoiMjM0MjY4MDM2OTk2OTY3NjM3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a88077ff842dcda3ed61a179e333fb14bc7e8a8a0e93d0d325627a048855abf0 |
| hovercard-subject-tag | issue:282142369 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/10002/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3ff347935a0c9cc00aa7969fcf446c42dc950d4cae8b24d2ca0a1d70ea514053/matplotlib/matplotlib/issues/10002 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3ff347935a0c9cc00aa7969fcf446c42dc950d4cae8b24d2ca0a1d70ea514053/matplotlib/matplotlib/issues/10002 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | minrk |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width