Anonymous
public text v1 · immutablelocal = ""
def progress(count, block, fileSize):
print(local)
def download(word, display, localfile):
local = localfile
if os.path.exists(localfile):
try:
os.remove(localfile)
except Exception:
return 1
print("Downloading "+display)
urllib.urlretrieve(word, localfile, progress)
urllib.urlcleanup()
return 0