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/006182.html below:

[Python-Dev] File Object Copy

[Python-Dev] File Object Copy [Python-Dev] File Object CopyMoshe Zadka Moshe Zadka <moshez@math.huji.ac.il>
Wed, 12 Jul 2000 09:09:11 +0300 (IDT)
I've found a need for the following function:

def copyfile(fin, fout):
	while 1:
		buf = fin.read(4096)
		if not buf:
			break
		fout.write(buf)

In several different places (modules I've written, SimpleHTTPServer uses
it, urllib has that code inlined somewhere, etc.)

(Of course, 4096 should be a parameter, but that's nits)

Can anyone suggest a module in which this function would belong?

--
Moshe Zadka <moshez@math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez




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