classmethod _Downloader.print_otw_msg(data_name='<data_name>', path_to_file='<file_path>', verbose=False, error_message=None, update=False)[source]

Print a short message for an otherwise situation.

  • data_name (str) – name of the prepacked data, defaults to '<name_of_data>'

  • path_to_file (str | os.PathLike[str]) – pathname of the prepacked data file, defaults to "<file_path>"

  • verbose (bool | int) – whether to print relevant information in console, defaults to False

  • error_message (Exception | str | None) – message of an error detected during execution of a function, defaults to None

  • update (bool) – whether to (check on and) update the prepacked data, defaults to False


>>> from pydriosm.downloader import _Downloader

>>> _Downloader.print_otw_msg() is None  # Nothing will be printed.

>>> _Downloader.print_otw_msg(verbose=True)

>>> _Downloader.print_otw_msg(verbose=2)
The collecting of <data_name> is cancelled, or no data is available.

>>> _Downloader.print_otw_msg(verbose=True, error_message="Errors.")
Failed. Errors.