On Mon, Jun 29, 2015 at 7:50 PM, Dylan Baker <[email protected]> wrote: > On Mon, Jun 29, 2015 at 07:34:46PM -0400, Ilia Mirkin wrote: >> Seems easy enough to just add a generic "run shell command X" >> compressor/decompressor... I always xz -9 piglit files, it gets >> *great* compression. > > Well, if xz was supported in python2 I wouldn't have bothered with > either gzip or bz2, since xz is clearly the best choice in most cases > (although someone like Rob or Eric might prefer gzip since it's less CPU > intensive). Also, pytho defaults to maximum compression level for all > of the compression formats it supports. > > But as to why do it in python rather than running magic shell > invocations for compressing/decompressing? > 1) No magic shell invocations to remember, it "just works" > 2) It's portable. Since it's all in python you don't have to worry about > whether your OS/machine has the right binaries or even supports the > right binaries, or if they're in your path, etc. > 3) If you've already compressed your results you can drop the magic > shell invocations, and just point piglit at them. (I have a python 3 > branch which does have xz support, and I can just point piglit at a > directory with an xz file in it and it works.)
Perhaps you misunderstood my comment. I meant why not have python call out to 'xz' and whatnot, instead of using the built-in facilities. I agree that it's nice to be cross-platform, but I don't think anyone will cry if python2 on windows is missing xz. -ilia _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
