with InfolderGoneWithTheWind(): ... executes the block in a

temporary folder under the current folder. The temporary folder is deleted on exiting the block.

>>> import os
>>> dir_ = os.getcwd()  # for the record
>>> len_ = len(os.listdir('.'))
>>> with InfolderGoneWithTheWind():  # doctest: +SKIP
...     # do some work in a folder here, e.g. write files
...     len(dir_) > len(os.getcwd()) and os.getcwd() in dir_
True
>>> # magically we are back in the original folder
>>> assert dir_ == os.getcwd()
>>> assert len(os.listdir('.')) == len_
Method __init__ no folder needs to be given
Method __enter__ Undocumented
Method __exit__ Undocumented
def __init__(self, prefix='_'):
no folder needs to be given
def __enter__(self):
Undocumented
def __exit__(self, *args):
Undocumented
API Documentation for cocopp, generated by pydoctor at 2020-01-21 16:27:37.