pycontrails.utils.temp

Temp utilities.

Functions

remove_tempfile(temp_filename)

Remove temp file.

temp_file()

Get context manager for temp file creation and cleanup.

temp_filename()

Get a filename in the host computers temp directory.

pycontrails.utils.temp.remove_tempfile(temp_filename)

Remove temp file.

Parameters:

temp_filename (str) – Temp filename

pycontrails.utils.temp.temp_file()

Get context manager for temp file creation and cleanup.

pycontrails.utils.temp.temp_filename()

Get a filename in the host computers temp directory.

More robust than using tempfile.NamedTemporaryFile()

Returns:

str – Temp filename

See also

temp_file

Context manager for temp file creation and cleanup