Skip to main content

Module utils

Module utils 

Source
Expand description

Port of fontTools.diff.utils, and of the parts of Python’s shutil that fontTools.diff uses.

Functions§

file_exists
file_exists: whether the path is an existing file (os.path.isfile).
get_file_modtime
get_file_modtime: the modification time of the file in ISO format, in the local time zone, e.g. 2024-01-31T12:34:56.789012+08:00.
get_tables_argument_list
get_tables_argument_list: the table tags given on the command line, padded with spaces to four characters, or None if none were given.
iso_local_time
datetime.fromtimestamp(timestamp, timezone.utc).astimezone().isoformat().
which
shutil.which(cmd): the path of an executable, looked up in PATH if cmd has no directory; on Windows, with the extensions of PATHEXT, and in the current directory first.