0

I'm trying to write a python script which will (based on given parameter) change current directory. Problem I'm facing, my script is changing directory while script is running. However once script is done it's jumping back to the directory in which I were before starting the script.

Is there any Python solution to my problem please?

Yat
  • 39
  • 6
  • 1
    Yeah, you can't do that. A process can't change its caller's directory. That's why `cd` is a shell built-in instead of some `/bin/cd` executable. – user2357112 Dec 28 '16 at 09:03
  • Ok thanks. Is there any python shell which would have all bash commands builtin as well? – Yat Dec 28 '16 at 09:10

0 Answers0