summaryrefslogtreecommitdiff
path: root/numpy/lib/user_array.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2015-12-19 15:01:55 -0700
committerCharles Harris <charlesr.harris@gmail.com>2015-12-19 15:01:55 -0700
commit443184b12513ce2a8adcc2a81c143bc4bc697219 (patch)
treefc417d094f5d027b8a3a1dfcd8bce94257989356 /numpy/lib/user_array.py
parente2bdaccba1a8691f9223b059b981b2890bb13b09 (diff)
downloadnumpy-443184b12513ce2a8adcc2a81c143bc4bc697219.tar.gz
ENH: Add context manager `temppath` to manage a temporary file.
Context manager intended for use when the same temporary file needs to be opened and closed more than once. The context manager creates the file, closes it, and returns the path to the file. On exit from the context block the file is removed. The file should be closed before exiting the context as an error will be raised on windows if not. Also fix up the `tempdir` context manager to deal with exceptions. Tests are added for both `temppath` and `tempdir`.
Diffstat (limited to 'numpy/lib/user_array.py')
0 files changed, 0 insertions, 0 deletions