pymor.tools.io

Submodules

Package Contents

pymor.tools.io.change_to_directory(name)[source]

Change current working directory to name for the scope of the context.

pymor.tools.io.file_owned_by_current_user(filename)[source]
pymor.tools.io.safe_temporary_filename(name=None, parent_dir=None)[source]

Cross~platform safe equivalent of re-opening a NamedTemporaryFile.

Creates an automatically cleaned up temporary directory with a single file therein.

Parameters

name

Filename component, defaults to ‘temp_file’.

dir

The parent dir of the new temporary directory. Defaults to tempfile.gettempdir().