temporary_cd

openff.toolkit.utils.utils.temporary_cd(dir_path)[source]

Context to temporary change the working directory.

Parameters:

dir_path – The directory path to enter within the context

Examples

>>> dir_path = '/tmp'
>>> with temporary_cd(dir_path):
...     pass  # do something in dir_path