get_remote_file

sage.misc.remote_file.get_remote_file(filename, verbose=True)

INPUT:

  • filename – the URL of a file on the web, e.g., "http://modular.math.washington.edu/myfile.txt"
  • verbose – whether to display download status

OUTPUT:

creates a file in the temp directory and returns the absolute path to that file.

EXAMPLES:

sage: g = get_remote_file("http://sagemath.org/ack.html", verbose=False)   # optional - internet
sage: len(open(g).read())   # optional - internet; random
10198
sage.misc.remote_file.report_hook(block, size, total)