obspy.core.util.misc.TemporaryWorkingDirectory

TemporaryWorkingDirectory()[source]

A context manager that changes to a temporary working directory.

Always use with “with” statement. Does nothing useful otherwise.

>>> with TemporaryWorkingDirectory():  
...    os.system('echo "$PWD"')