I have below code in tes.py file.
#!/usr/bin/python
import os
path = '/tmp'
f_path = os.chdir( path )
f = os.getcwd()
print f
os.system('cd f')
I want to get into /tmp directory when I execute tes.py file. But I am getting following error.
[rishb@xxxxxxx ~]$ ./tes.py
/tmp
sh: line 0: cd: f: No such file or directory
Is there any way to achieve my goal in python?