_Downloader.print_otw_msg

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

Print a short message for an otherwise situation.

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

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

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

  • error_message (Exception or str or 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

Tests:

>>> from pydriosm.downloader import _Downloader

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

>>> _Downloader.print_otw_msg(verbose=True)
Cancelled.

>>> _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.