Menu

#6 xmgrace exit bug

open
nobody
5
2012-12-10
2006-05-17
Anonymous
No

Hi,

I'm new to cdat. I'm using xmgrace to make a plot and I find a
problem. I try to explain what is happening semplifying a bit what I'm
actually doing.

Inside a for loop I try to open, save and close an xmgrace plot but at
the second iteration the python pipe results brocken and I get this
error message:

close failed: [Errno 10] No child processes

I'm opening and closing the xmgrace plot as:

p=xmgrace.init()
p.clean_exit()

Since the pipe is brocken after one iteration (at the clean_exit) when I
try to run for example a commands.getoutput command into the loop
after the clean_exit the script crushes with the following error (from
the ipython shell):

/scisoft/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/commands.py in getoutput(cmd)

42 def getoutput(cmd):
43 """Return output (stdout or stderr) of executing cmd in a
shell."""
---> 44 return getstatusoutput(cmd)[1]
45
46

/scisoft/Library/Frameworks/Python.framework/Versions/2.4/lib/
python2.4/commands.py in getstatusoutput(cmd)

53 pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r')
54 text = pipe.read()
---> 55 sts = pipe.close()
56 if sts is None: sts = 0
57 if text[-1:] == '\n': text = text[:-1]

IOError: [Errno 10] No child processes

I tried to find out a solution by myself but with not much luck.

I hope you can help me out with this.
Thanks a lot
Gabriele Garavini
gabri@physto.se

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.