On Sun, Feb 27, 2011 at 3:45 AM, cool-RR <cool...@cool-rr.com> wrote:
> I think that if someone calls `__enter__` directly, he takes the > responsibility of calling `__exit__`, so we don't really have to help him > with `__del__`. > But other than that I understand the motivation for making it start on > `__init__` rather then `__enter__`. I'll just make my own version of it that > will work on `__enter__` instead. > Thanks, > Ram. TempDir from 'fixtures' (http://pypi.python.org/pypi/fixtures) will do what you want - __enter__ creates the directory, __exit__ deletes it. Cheers, Rob _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com