2024-05-23 00:44:40 发布
网友
如何在Python中设置当前工作目录?
尝试^{}
os.chdir(path) Change the current working directory to path. Availability: Unix, Windows.
os.chdir(path)
Change the current working directory to path. Availability: Unix, Windows.
也许这就是你想要的:
import os os.chdir(default_path)
import os print os.getcwd() # Prints the current working directory
要设置工作目录:
os.chdir('c:\\Users\\uname\\desktop\\python') # Provide the new path here
尝试^{}
也许这就是你想要的:
要设置工作目录:
相关问题 更多 >
编程相关推荐