8000 [Bug]: macosx backend pause() cannot be ctrl-c'd · Issue #27120 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: macosx backend pause() cannot be ctrl-c'd #27120
Closed
@anntzer

Description

@anntzer

Bug summary

Unlike with other backends, a plt.pause() on a macosx figure cannot be interrupted with ctrl-c.

Code for reproduction

python -c 'from pylab import *; plot(); show(block=False); pause(5)'

Then press ctrl-c while the pause is running.

Actual outcome

pause() is not interrupted.

Expected outcome

pause is interrupted, like for other backends.

Additional information

Likely the solution is the same as for qt: the ctrl-c handling code in FigureManagerMac.start_main_loop (i.e. _maybe_allow_interrupt, for the qt case) needs to be more or less duplicated into FigureCanvasMac.start_event_loop -- (except that right now FigureCanvasMac.start_event_loop is implemented in ObjC so things need to be moved around a bit).

Operating system

macOS

Matplotlib Version

v3.8.0-447-g112a225738

Matplotlib Backend

macosx

Python version

3.11

Jupyter version

enosuchlib

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0