Skip to content

Pylab with OSX backend keyboard focus issue and hang #1188

Closed

Description

@claumann

Howdy-
I'm having strange issues with keyboard focus and matplotlib windows with the MacOSX backend and github ipython 0.13 (synced yesterday). Start a session as follows:

$ ipython --pylab
Python 2.7.2 |EPD 7.1-1 (64-bit)| (default, Jul  3 2011, 15:56:02) 
Type "copyright", "credits" or "license" for more information.

IPython 0.13.dev -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

Welcome to pylab, a matplotlib-based Python environment [backend: MacOSX].
For more information, type 'help(pylab)'.

In [1]: plot(r_[0:1:0.1],sin(r_[0:1:0.1]))
Out[1]: [<matplotlib.lines.Line2D at 0x1056a3850>]

Now, if I click on the figure window that matplotlib produces it responds just fine -- the buttons pan/zoom/etc work. However, typing at the keyboard sends the keystrokes to the Terminal in which ipython is running (note, the same behavior happens in the qtconsole). Thus the keyboard shortcuts don't work (I noticed this first when trying to use a custom matplotlib-based widget that I do some analysis with).

The bigger bug is that if I click on the save button, I get a standard OSX save file dialog box which handles mouse events just fine but can't receive keyboard input. For instance, I can't type into the filename text box. Worse, the key strokes now don't even appear in the IPython console. In fact, at this point, IPython is completely hosed and won't accept keyboard input at all (even typed directly into the terminal) and I end up having to kill IPython with ^C or kill.

Activity

  1. minrk commented on Dec 20, 2011

    @minrk
    Member

    This seems EPD-specific, because I can use the same IPython+matplotlib without EPD and they work fine.

    I also see the same weird behavior with the osx backend of matplotlib from a pure-Python terminal on EPD (again, does not affect system Python), so I would bring this up with the EPD or MPL lists, as it isn't IPython related.

    Are you using the EPD matplotlib, or your own, and if you built it yourself, did you build it with EPD or system Python? I only see this when I'm using matplotlib that I built with system Python (current git master), but is still found by EPD because I installed it --user.

  2. asmeurer commented on Jul 16, 2012

    @asmeurer
    Contributor

    I don't think this is EPD specific per se. I see this too, and I don't have EPD installed.

  3. minrk commented on Jan 20, 2013

    @minrk
    Member

    It looks like this issue was moved to matplotlib/matplotlib#665, which has been closed, so I am closing here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions