modify_pytwin_working_dir#

pytwin.modify_pytwin_working_dir(new_path, erase=True)#

Modify global pytwin working directory.

Parameters:
new_path: str

Absolute path to the working directory you want to use for pytwin package. It is created if it does not exist.

erase: bool

if True, erase non-empty existing working directory and create a new one. If False, use existing working directory as it is. Value has no effect if directory does not exist.

Raises:
PyTwinSettingsError

If provided path is None. If provided path does not exist AND some parent directories do not exist or last parent directory does not have writing permission. If erase is not a boolean.

Examples

>>> # Modify working directory
>>> from pytwin import modify_pytwin_working_dir
>>> modify_pytwin_working_dir('path_to_new_working_dir', erase=False)