def download(url, filename, overwrite = False):
from requests import get<EOL>from os.path import exists<EOL>debug('<STR_LIT>' + str(url) + '<STR_LIT>')<EOL>data = get(url)<EOL>if data.status_code == <NUM_LIT:200>:<EOL><INDENT>if not exists(filename) or overwrite:<EOL><INDENT>f = open(filename, '<STR_LIT:wb>')<EOL>f.write(data.content)<EOL>f.close()<EOL><DEDENT>return True<EOL><DEDENT>return False<EOL>
Downloads a file via HTTP.