8000 [Sprint] macosx backend doesn't respond to key_press_events (sometimes) · Issue #2120 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Sprint] macosx backend doesn't respond to key_press_events (sometimes) #2120
Closed
@mrterry

Description

@mrterry

For some combinations of virtualenvs, distributions, python version, and virtual environments, the macosx backend does not respond to key_press_events.

I can confirm failures with mpl 1.2.1, OSX 10.8.3, anaconda v1.4.6.
From the thread on matplotlib-users, Scott Lasley has failures with:
mpl 1.2.1/1.3.0r2, OSX 10.8, python3.3.2 (framework python.org in virutalenvs)
but
mpl 1.4.x not installed in a virtualenv works.

The following script ought to respond to key_press_events.

import pylab as plt
plt.switch_backend('macosx')
# plt.switch_backend('tkAgg')

def print_event(event):
    print event

fig = plt.figure()
fig.canvas.mpl_connect('key_press_event', print_event)
plt.show()

@mdboom edit: Adding "sprint" to the title, since I overheard a lot of work being done on this there.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0