Florent Xicluna <la...@yahoo.fr> added the comment:

A patch which provides a context manager and a decorator.
(with ideas from Ezio and Antoine)

Sample usages:

with temp_cwd() as cwd:
  assert cwd == os.getcwd()


@writablecwd
def test_zipfile():
  # do something useful
  print os.path.abspath('.')

----------
nosy: +pitrou
Added file: http://bugs.python.org/file15907/temp_cwd_decorator.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7712>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to