OS linux 2.6.18
python 2.4.3
i tried to compress data throw gzip using popen2.popen3
but can't recive thouse 5 bytes, program hangs on read
cat /filename |gzip -f>filename2 - works excelent
don't offer to use zlib or bz2 modules
i wish to compress long data sequens throw external program so sending EOF is not good decition
how to write data to external program and recive result immidiatly?
python 2.4.3
i tried to compress data throw gzip using popen2.popen3
Code:
import popen2
a=popen2.Popen3("gzip -f")
a.tochild.write("test data")
a.tochild.flush()
a.fromchild.read(5) #try to read 5 bytes from gzip
cat /filename |gzip -f>filename2 - works excelent
don't offer to use zlib or bz2 modules
i wish to compress long data sequens throw external program so sending EOF is not good decition
how to write data to external program and recive result immidiatly?
Comment