Skip to content

SIGINT is ignored by MacOSX backend #3991

@Equidamoid

Description

@Equidamoid

Here is an example:

import matplotlib
#matplotlib.use('Qt4Agg')
from matplotlib import pyplot as plt
plt.plot(1, 1)
plt.show()

Run this script from terminal, wait for the window to appear and press Ctrl-C (in terminal). The script will not die.
Then uncomment the matplotlib.use line an Ctrl-C will work as intended.

UPD:
If I press Ctrl-C and then move mouse over the plot window the following exception appears in the log:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/matplotlib/backend_bases.py", line 1850, in enter_notify_event
    def enter_notify_event(self, guiEvent=None, xy=None):
KeyboardInterrupt

The same is for callback set using signal.signal(signal.SIGTERM, cb), callback is not called until window receives any event (focus change, mouse move, etc).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy