[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/LibSimpleHTTPServer.py,1.10,1.11
Mark Hammond
mhammond@skippinet.com.au
Sat, 29 Jul 2000 23:13:57 +1000
</F>
> > and if I want to, how do I tweak the block size?
[Moshe]
> Just like you would in the old days: subclass SimpleHTTPServer, and
> substitute the copyfile method with a call to shutil.copyfile with a
> non-default size. (IOW, it's easier then what it was before).
I think thats a little of an overkill. It requires duplicating the entire
method for the sake of one constant.
def copyfile(self, source, outputfile):
BLOCKSIZE = 8192
to
def copyfile(self, source, outputfile, blocksize = 8192):
is much more reasonable IMO.
Mark.