Antoon Pardon <[EMAIL PROTECTED]> wrote: > On 2007-02-09, Philipp Pagel <[EMAIL PROTECTED]> wrote: > > for filename in file_list: > > file = os.popen('uncompress -c '+filename, 'r') > > do_something(file) > > file.close() > > > > This works fine for some files but results in > > > > 'write error onstdout: Broken pipe'
> As far as I can tell, your do_something doesn't consume the entire file. > So you close the file prematurly, which results in the uncompress/zcat > program trying to write to a pipe that is closed on the otherside, > giving you the above message. You are right: some of the files do not fulfill certain critereia causing so_somehting() to return before the entire file is processed. Thanks! cu Philipp -- Dr. Philipp Pagel Tel. +49-8161-71 2131 Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186 Technical University of Munich http://mips.gsf.de/staff/pagel -- http://mail.python.org/mailman/listinfo/python-list