[issue10016] shutil.copyfile -- allow sparse copying

2010-10-04 Thread Tom Potts
Tom Potts karake...@gmail.com added the comment: @pitrou Hmm... the online docs and the contents of the doc directory on the trunk branch say differently: Resize the stream to the given *size* in bytes (or the current position if *size* is not specified). The current stream position isn't

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
New submission from Tom Potts karake...@gmail.com: Copying a sparse file under Linux using shutil.copyfile will not result in a sparse file at the end of the process. I'm submitting a patch that will remedy this. Note that I am only concerned with Linux at the moment -- as far as I know

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Tom Potts karake...@gmail.com added the comment: (see opening message) -- Added file: http://bugs.python.org/file19108/shutil-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016

[issue10016] shutil.copyfile -- allow sparse copying

2010-10-02 Thread Tom Potts
Changes by Tom Potts karake...@gmail.com: Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10016

File holes in Linux

2010-09-29 Thread Tom Potts
Hi, all. I'm not sure if this is a bug report, a feature request or what, so I'm posting it here first to see what people make of it. I was copying over a large number of files using shutil, and I noticed that the final files were taking up a lot more space than the originals; a bit more

Re: if the else short form

2010-09-29 Thread Tom Potts
This is just a sneaky shorthand, which is fine if that's what you want, but it makes it harder to read. The reason it works is that 'fill==True' is a boolean expression, which evaluates to True or False, but if you force a True into being an integer, it will be 1, and a False will become 0. Try