[Eric] text.usetex

Larry Shaffer larrys at dakotacarto.com
Mon Feb 8 18:40:44 GMT 2010


All,

When using subprocess.Popen() or .call() I seem to always (regardless of
what subprocess I am trying to run) get that error when I follow the parent
process, and am not entirely sure why. The error makes sense, just not why
it's happening. When running into the child process, everything works as
expected for me, unless Popen() is not formatted just right. The subprocess
module seems to be rather particular compared to all of the older, now 'not
recommended' ways to run a subprocess.

Of course, none of this really helps you if you have no control over how
subprocess is being called (as with an external module like matplotlib).

Sorry, don't have time to install matplotlib, etc. and test. Just wanted to
let you know that I have run into similar situations with subprocess in
eric. 

-- 
Larry


> From: detlev <detlev at die-offenbachs.de>
> Date: Mon, 8 Feb 2010 19:05:55 +0100
> To: <eric at riverbankcomputing.com>
> Subject: Re: [Eric] text.usetex
> 
> Hi,
> 
> it works for me. Could somebody try to debug it. Could it be a matplotlib
> related issue?
> 
> Detlev
> 
> On Montag, 8. Februar 2010, Serge Montagnac wrote:
>> Hi Detlev,
>> 
>> The debugged program raised the exception unhandled error
>> "(9, 'Bad file descriptor')"
>> File: /usr/lib/python2.6/subprocess.py, Line: 1126
>> 
>> 
>> I confirm that this behavior is very inconvenient and was not present
>> in previous releases 6 months ago ... eric-4.3.7 is the last working
>> normally.
>> ... so inconvenient that I had to move to Wing IDE as I am
>> unable to run any application with an os fork without a crash of the
>> application itself or a crash of eric.
>> 
>> Serge.
>> 
>> On 02/07/2010 10:03 PM, David Arnold wrote:
>>> Detlev,
>>> 
>>> OK. I tried selecting the parent process and that gave another popup with
>>> this error:
>>> 
>>> The debugged program raised the exception unhandled error
>>> "(9, 'Bad file descriptor')"
>>> File:
>>> /Library/Frameworks/Python.framework/Versions/6.0.0/lib/python2.6/subproc
>>> ess.py, Line: 1126
>>> 
>>> Break here?
>>> 
>>> When I select the child process, nothing happens, not matplotlib figure
>>> window is available.
>>> 
>>> When I run it from the command line in a terminal window, it works fine.
>>> 
>>> Here is my code again:
>>> 
>>> import matplotlib as mpl
>>> import matplotlib.pyplot as plt
>>> mpl.rcParams['text.usetex']=True
>>> import numpy as np
>>> 
>>> x=np.arange(0, 5, 0.01)
>>> y=[np.sin(2*np.pi*xx)*np.exp(-xx) for xx in x]
>>> 
>>> plt.plot(x, y)
>>> 
>>> plt.show()
>>> 
>>> On Feb 7, 2010, at 2:31 AM, detlev wrote:
>>>> On Samstag, 6. Februar 2010, David Arnold wrote:
>>>>> Hi,
>>>>> 
>>>>> I'm trying this:
>>>>> 
>>>>> import matplotlib as mpl
>>>>> import matplotlib.pyplot as plt
>>>>> mpl.rcParams['text.usetex']=True
>>>>> import numpy as np
>>>>> 
>>>>> x=np.arange(0, 5, 0.01)
>>>>> y=[np.sin(2*np.pi*xx)*np.exp(-xx) for xx in x]
>>>>> 
>>>>> plt.plot(x, y)
>>>>> 
>>>>> plt.show()
>>>>> 
>>>>> Running in Eric4 a popup asks me to select a fork branch to follow. I
>>>>> don't understand this.
>>>> 
>>>> That just means, that eric detectedan os.fork() call and asks you, which
>>>> path to follow. Just select parent or child.
>>>> 
>>>>> However, running the file from the terminal works just fine.
>>>>> 
>>>>> D.
>>>>> _______________________________________________
>>>>> Eric mailing list
>>>>> Eric at riverbankcomputing.com
>>>>> http://www.riverbankcomputing.com/mailman/listinfo/eric
>>>> 
>>>> Regards,
>>>> Detlev
>>> 
>>> _______________________________________________
>>> Eric mailing list
>>> Eric at riverbankcomputing.com
>>> http://www.riverbankcomputing.com/mailman/listinfo/eric
>> 
> 
> 
> -- 
> Detlev Offenbach
> detlev at die-offenbachs.de
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric
> 




More information about the Eric mailing list