pendant.util module¶
-
class
pendant.util.
ExitCode
[source]¶ Bases:
int
The code returned to a parent process by an executable.
Examples
>>> from subprocess import call >>> exit_code = ExitCode(call('ls')) >>> exit_code.is_ok() True
-
pendant.util.
format_ISO8601
(moment: datetime.datetime) → str[source]¶ Format a datetime into a filename compatible IS8601 representation.
Parameters: moment – A datetime. Returns: The ISO8601 datetime formatted with hyphens as seperators. Examples
>>> from datetime import datetime >>> format_ISO8601(datetime(2018, 2, 23, 12, 13, 38)) '2018-02-23T12-13-38'