Skip to content

Pylab with OSX backend keyboard focus issue and hang #1188

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

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