[New-bugs-announce] [issue5178] Add content manager for temporary directory

Neil Schemenauer report at bugs.python.org
Sat Feb 7 18:54:21 CET 2009


New submission from Neil Schemenauer <nas-python at arctrix.com>:

I noticed that it would be nice to have a temporary directory context
manager while trying to fix a broken unittest.  The attached patch
provides a pretty minimal implementation.  There appears to be lots of
unit tests that could use such a thing (just search for "rmtree").

I'm not sure if TemporaryDirectory is the best name.  Also, perhaps it
should have a __del__ method although that's tricky business.

----------
assignee: ncoghlan
files: tempdir.patch
keywords: patch
messages: 81342
nosy: nascheme, ncoghlan
severity: normal
stage: patch review
status: open
title: Add content manager for temporary directory
type: feature request
Added file: http://bugs.python.org/file12970/tempdir.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5178>
_______________________________________


More information about the New-bugs-announce mailing list