我正在尝试从 Python 脚本更改终端的目录。程序成功执行,但我终端中的目录没有改变。这是程序。
os
path = "/home/najeeb/Desktop/project/scan"
r = os.getcwd()
print "\n Current working directery is %s \n" % r
os.chdir(path)
retval = os.getcwd()
print "Directery changes successfull %s \n" % retval