TempFileHandler

class pyarts.utils.common.TempFileHandler(prefix='pyarts', suffix='.tmp', dir=None)[source]

Context manager for creating and deleting temporary files.

This class is a context manager that creates a temporary file and deletes it when the context is exited. The file is automatically removed if an exception occurs.

Parameters:
  • prefix (str) – Optional prefix for the temporary file name.

  • suffix (str) – Optional suffix for the temporary file name.

  • dir (str) – Optional directory for the temporary file.

__init__(prefix='pyarts', suffix='.tmp', dir=None)[source]

Methods

__init__([prefix, suffix, dir])