Maxmium bufsize using open2?
Thomas Güttler
guettler at thomas-guettler.de
Thu Jul 10 06:17:56 EDT 2003
Maurice wrote:
> Dear all,
>
> I've a problem using popen2 when using large files.
> When I use small input files everything works well but when I feed large
> inputfile to the pipe nothing happens. Is there a maximum bufsize for
> using the pipe. The code I use is written down here below. Do I need to
> specify a waittime between line 4 and 5 ?
>
>
> o,i =popen2('command '))
> fh=open(os.path.join(self.dirname, self.filename),'r')
> i.write(fh.read())
> i.close()
> self.StringData=o.read()
> o.close()
Hi,
Have a look at the select module.
thomas
More information about the Python-list
mailing list