nipype.utils.tmpdirs module¶
- class nipype.utils.tmpdirs.InTemporaryDirectory(suffix='', prefix='tmp', dir=None)¶
- class nipype.utils.tmpdirs.TemporaryDirectory(suffix='', prefix='tmp', dir=None)¶
Bases:
object
Create and return a temporary directory. This has the same behavior as mkdtemp but can be used as a context manager. For example:
- with TemporaryDirectory() as tmpdir:
…
Upon exiting the context, the directory and everthing contained in it are removed.
- cleanup()¶