# grass.utils package

## Submodules

## grass.utils.download module

Download and extract various archives

exception `grass.utils.download.``DownloadError`

  Bases: `Exception`

  Error happened during download or when processing the file

`grass.utils.download.``debug`(*args, **kwargs)

  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)

  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)

  Extract a TAR or a similar file into a directory

`grass.utils.download.``extract_zip`(name, directory, tmpdir)

  Extract a ZIP file into a directory

`grass.utils.download.``name_from_url`(url)

  Extract name from URL

Help Index | Topics Index | Keywords Index | Full Index

© 2003-2024 GRASS Development Team, GRASS GIS 8.3.3dev Reference Manual