阅读量:99
在Python中,cd 命令并不是内置的,而是操作系统提供的 shell 命令
例如,在Unix和Linux系统中,你可以使用 os.chdir() 函数来改变当前工作目录:
import os
os.chdir('/path/to/directory')
在Windows系统中,你可以使用 os.chdir() 函数或者 os.system('cd path_to_directory') 来改变当前工作目录。