A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/007638.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/LibSimpleHTTPServer.py,1.10,1.11

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/LibSimpleHTTPServer.py,1.10,1.11Mark 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.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4