This answer provides a very helpful way to download a file from the internet using Python 3.
Essentially it says to use:
with urllib.request.urlopen(url) as response, open(file_name, 'wb') as out_file:
shutil.copyfileobj(response, out_file)
if the url
specifies a huge file, isn't the response
automatically stored in memory? I.e. even though copyfileobj
buffers the file, doesn't just making the request return the entire large file as response
?