grass.utils package¶
Submodules¶
grass.utils.download module¶
Download and extract various archives
-
exception
grass.utils.download.
DownloadError
[source]¶ Bases:
Exception
Error happened during download or when processing the file
-
grass.utils.download.
debug
(*args, **kwargs)[source]¶ Print a debug message (to be used in this module only)
Using the stanard grass.script debug function is nice, but it may create a circular dependency if this is used from grass.script, so this is a wrapper which lazy imports the standard function.
-
grass.utils.download.
download_and_extract
(source, reporthook=None)[source]¶ Download a file (archive) from URL and extract it
Call urllib.request.urlcleanup() to clean up after urlretrieve if you terminate this function from another thread.
-
grass.utils.download.
extract_tar
(name, directory, tmpdir)[source]¶ Extract a TAR or a similar file into a directory