(self, path: Optional[str] = None)
Initialize directory context manager

        Parameters
        ----------
        path : None or str, optional
            path to change directory to, for duration of ``with`` block.
            Defaults to ``os.getcwd()`` if None
Initialize directory context manager
Initialize directory context manager
def __init__(self, path: Optional[str] = None) -> None:
        """Initialize directory context manager

        Parameters
        ----------
        path : None or str, optional
            path to change directory to, for duration of ``with`` block.
            Defaults to ``os.getcwd()`` if None
        """
        if path is None:
            path = os.getcwd()
        self.name = os.path.abspath(path)
def __init__ ( self , path : Optional [ str ] = None ) -> None : if path is None : path = os . getcwd ( ) self . name = os . path . abspath ( path )