subprocess problem on WinXP
Wolfgang
wollez at gmx.net
Wed Jul 26 13:33:30 EDT 2006
Hi Simon,
I did not know that library! I'm still new to python and I still have
problems to find the right commands.
But I suppose this library is mainly for partially
compressing/decompressing of files. How can I use that library to
compress/decompress full files without reading them into memory? And
what about performance?
Thanks
Wolfgang
Simon Forman schrieb:
> Wolfgang wrote:
>> Hi,
>>
>> I want to compress all files (also in subfolder). The code is working
>> more or less, but I get a black popup window (command line window) for
>> every file to compress. How do I cave to change my system call that
>> nothing pops up?
>>
>> Wolfgang
>>
>> import os
>> import subprocess
>>
>> dir="g:\\messtech"
>>
>> for root, dirs, files in os.walk(dir):
>> for file in files:
>> f=os.path.join(root,file)
>> subprocess.Popen([r"bzip2",'', f],shell=False).wait()
>
> How about forgetting the system call and just using the bz2 standard
> library module?
>
> http://docs.python.org/lib/module-bz2.html
>
> Peace,
> ~Simon
>
More information about the Python-list
mailing list