write error: Broken pipe

Posted by Fahim on Stack Overflow See other posts from Stack Overflow or by Fahim
Published on 2010-04-25T21:00:43Z Indexed on 2010/04/25 21:03 UTC
Read the original article Hit count: 466

Filed under:
|
|
|

Hi,

I have to run a tool on around 300 directories. Each run take around 1 minute to 30 minute or even more than that. So, I wrote a python script having a loop to run the tool on all directories one after another.

my python script has code something like:

for directory in directories:
  os.popen('runtool_exec ' + directory)

But when I run the python script I get the following error messages repeatedly:

..
tail: write error: Broken pipe
date: write error: Broken pipe
..

All I do is login on a remote server using ssh where the tool, python script, and subject directories are kept. When I individually run the tool from command prompt using command like:

runtool_exec directory

it works fine. "broken pipe" error is coming only when I run using the python script. Any idea, workaround?

Please suggest.

Thanks. Fahim

© Stack Overflow or respective owner

Related posts about linux

Related posts about python