subprocess problem on WinXP

Wolfgang wollez at gmx.net
Wed Jul 26 18:23:33 EDT 2006


Simon Forman schrieb:
> Wolfgang wrote:
>> Hi Simon,
>>
>> I did not know that library! I'm still new to python and I still have
>> problems to find the right commands.
> 
> Welcome. : )  Python comes with "batteries included".  I'm always
> finding cool new modules myself, and I've been using it for years. In
> fact, I didn't notice the bz2 module until about a week ago.
> 
the main problem is to find out how to use all these nice tools ;-)

> 
> Read the docs.  There seems to be api for (de)compressing both
> "streams" of data and whole files.

Understanding the docs is the next issue!  for example the subprocess 
module: there is startupinfo=None, creationflags=0 but absolutely no 
details what flags are valid! I suppose these values are passed through 
without any checking and for a stupid user (like me) it is impossible to 
find out how to use this.

> 
> I don't know about performance, as I've never tried to use the module
> before, but I would bet that it's good.  It almost certainly uses the
> same bzip2 library as the bzip2 program itself and it avoids the
> overhead of creating a new process for each file.
> 
> But if you're in doubt (and performance really matters for this
> application) test and measure it.

I've read about measuring the performance somewhere in the mailing list 
but I doubt that I can implement an algorithm without knowing the file 
structure of the (to be compressed) files.

I will test your script tomorrow (but my one is running for more than an 
hour now (on 16GB of data)


Cheers
Wolfgang




More information about the Python-list mailing list