¡@

Home 

python Programming Glossary: self._cwd

How to get/set logical directory path in python

http://stackoverflow.com/questions/123958/how-to-get-set-logical-directory-path-in-python

import Popen PIPE class CwdKeeper object def __init__ self self._cwd os.environ.get PWD if self._cwd is None # no environment. fall.. object def __init__ self self._cwd os.environ.get PWD if self._cwd is None # no environment. fall back to calling pwd on shell.. None # no environment. fall back to calling pwd on shell self._cwd Popen 'pwd' stdout PIPE .communicate 0 .strip self._os_getcwd..