is it worth replacing a couple of lines of obvious code with a reference to a little-used module? and if I want to, how do I tweak the block size? </F> > *** SimpleHTTPServer.py 2000/05/21 16:25:29 1.10 > --- SimpleHTTPServer.py 2000/07/29 05:15:56 1.11 > *************** > *** 16,19 **** > --- 16,20 ---- > import urllib > import cgi > + import shutil > from StringIO import StringIO > =20 > *************** > *** 152,161 **** > =20 > """ > !=20 > ! BLOCKSIZE =3D 8192 > ! while 1: > ! data =3D source.read(BLOCKSIZE) > ! if not data: break > ! outputfile.write(data) > =20 > def guess_type(self, path): > --- 153,157 ---- > =20 > """ > ! shutil.copyfileobj(source, outputfile) > =20 > def guess_type(self, path): >=20 >=20 > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://www.python.org/mailman/listinfo/python-checkins
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