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

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Sat, 29 Jul 2000 09:42:14 +0200


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