How do I keep the focus on the command prompt when calling pylab.show?
Question: I am calling a python script from the comandline (bash under Ubuntu):

    
    
    > python myScript.py
    

within this script, I create a figure, show it (nonblocking) with PyLab and
wait for a user entry:

    
    
    import matplotlib as mpl
    mpl.use('TkAgg')
    import pylab as pl
    
    fig = pylab.figure()
    # Figure gets some content here
    pl.show(block=False)
    inp = raw_input('Please enter your choice: ') # Prompt window has no focus
    

Now my problem is, that the figure window, that is poping up, has the focus.
But I want the focus to stay at or return to the command line window for
interaction with the raw_input...

Any suggestions how to achieve this?

Thanks in advance!


Answer: Some other lower level backends tend not to do it, try:

    
    
    import matplotlib as mpl
    mpl.use('Agg')
    

