threeML.io.download_from_http module

class threeML.io.download_from_http.ApacheDirectory(url)[source]

Bases: object

Allows to interact with a directory listing like the one returned by an Apache server

property directories
download(remote_filename, destination_path: str, new_filename=None, progress=True, compress=False)[source]
download_all_files(destination_path, progress=True, pattern=None)[source]

Download all files in the current directory

Parameters:
  • destination_path – the path for the destination directory in the local file system

  • progress – (True or False) whether to display progress or not

  • pattern – (default: None) If not None, only files matching this pattern (a regular expression) will be

downloaded :return: list of the downloaded files as absolute paths in the local file system

property files
exception threeML.io.download_from_http.HTTPError[source]

Bases: OSError

exception threeML.io.download_from_http.RemoteDirectoryNotFound[source]

Bases: OSError