I want to implement a userland command that will take one of its arguments (path) and change the directory to that dir. After the program completion I would like the shell t
As codaddict writes, what happens in your sub-shell does not affect the parent shell. However, if your goal is present the user with a shell in a different directory, you could always have Python use os.chdir to change the sub-shell's working directory and then launch a new shell from Python. This will not change the working directory of the original shell, but will leave the user with one in a different directory.