def chdir(self, path):
if self._cwd is None:<EOL><INDENT>self._cwd = os.getcwd()<EOL><DEDENT>if hasattr(path, "<STR_LIT>"):<EOL><INDENT>path.chdir()<EOL><DEDENT>elif isinstance(path, Path):<EOL><INDENT>os.chdir(str(path))<EOL><DEDENT>else:<EOL><INDENT>os.chdir(path)<EOL><DEDENT>
Change the current working directory to the specified path.
        Path can be a string or a py.path.local object.