qtoolkit.utils module#

qtoolkit.utils.cd(path: str | Path)[source]#

A Fabric-inspired cd context that temporarily changes directory for performing some tasks, and returns to the original working directory afterwards. e.g.,

with cd(“/my/path/”):

do_something()

Imported from monty to avoid importing it. TODO: check if can be directly used from monty.

Parameters:

path – Path to cd to.