is their any limit on the size of the data passed to a progra m via popen2?
husam
h.jehadalwan at student.kun.nl
Sat Feb 23 09:58:54 EST 2002
Gustavo Cordova wrote:
> That doing a read() on pipes hangs, so you have to
> define a timeout or something, so that you can take
> control back.
>
> But I dinnae kno how ta do such a thang.
>
> :-/
>
> -gus
>
> pd: I *think* it was jeff.
>
>
Ya, I red that one. But, now the problem is that running the code
succefully really depends on the number of the files passed to the
application in one "popen2" session. I found that the number of the
files must not exceed 250. I worked around this by splitting the 10000
files into 50 lists each of them contains 200 files and for each list
opening a "popen2" session and close it at the end in a "for" loop. Now
the code works fine. I have searched the internet for informations
related to the size of the pipe and how to modify it, but I found
nothing except "select.select()". At the moment I really don't have time
to implement this.
any way, thanks for the contribution.
More information about the Python-list
mailing list