New submission from anatoly techtonik <techto...@gmail.com>:

os.chdir(path) is often used with os.getcwd() call and doesn't return anything. 
It can return the name of the directory before the change.

prev = os.chdir(path)
...
os.chdir(prev)

Maybe it will also be possible to implement 'with' construct:

with os.chdir(path):
  ...

----------
messages: 108822
nosy: techtonik
priority: normal
severity: normal
status: open
title: os.chdir(path) to return current dir
type: feature request

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

Reply via email to