python 2.4.3
i tried to compress data throw gzip using popen2.popen3
Expand|Select|Wrap|Line Numbers
- 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?