[IPython-user] Gtk (and specifically matplotlib) support in ipython

Fernando Perez Fernando.Perez at colorado.edu
Fri Aug 13 13:37:50 CDT 2004

Fernando Perez wrote:
> Prabhu Ramachandran wrote:
>>>>>>>"FP" == Fernando Perez <Fernando.Perez at colorado.edu> writes:
>>    FP> The code already works fairly well, with one significant
>>    FP> caveat: any process started via os.system() (whether directly
>>    FP> or implicitly using !cmd) will hang after a while.  I have
>>    FP> currently no solution for this, but will welcome any ideas.
>>    FP> Note that the problem seems to only affect long-running GUI
>>    FP> apps, simple '!grep foo *' type things appear to function just
>>    FP> fine.  But something like '!gv foo.eps &' will open gv, and
>>    FP> after about 30 seconds the gv instance stops responding to all
>>    FP> keyboard/mouse input.
>>You probably already have tried this but how about using
>>os.spawnl(...).  Here a simple use case:
>> pid = os.spawnl(os.P_NOWAIT, script, script)
> Uh, no, not really.  When I said I was an ignoramus, I wasn't kidding.
> But it doesn't seem to to work:
> In [1]: import os
> In [2]: os.spawnl(os.P_NOWAIT,'/usr/X11R6/bin/xcalc')
> Out[2]: 27433

Sorry, my bad.  Despite the docs showing the calling sequence as:

spawnlp(  	mode, file, ...)

you actually have to supply the file argument _twice_ (as Prabhu correctly 
pointed out in his example).  The docs here are kind of funky...

However, the deadlock happens as well.  Just as stumped...



More information about the IPython-user mailing list