class documentation
Contextmanager to do some work in a folder of choice and change dir back in the end.
Usage:
>>> import os >>> import cocopp.toolsdivers >>> dir_ = os.getcwd() # for the record >>> with cocopp.toolsdivers.Infolder('..'): ... # do some work in a folder here, e.g. open a file ... len(dir_) > len(os.getcwd()) and os.getcwd() in dir_ True >>> # magically we are back in the original folder >>> assert dir_ == os.getcwd()
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Instance Variable | root |
Undocumented |
Instance Variable | target |
Undocumented |