Hi I am trying to write the python script by which I can change my pwd to /usr/local/src but the problem is this by using below script again I am redirecting to my prevoius directory
import os
def path_init():
print os.getcwd()
os.chdir("/usr/local/src")
print os.getcwd()
def main():
path_init()
if __name__ == 'main':
main()
output:
[root@localhost Desktop]# python p.py
/root/Desktop
/usr/local/src
[root@localhost Desktop]