Pythonでカレントワーキングディレクトリを設定するには?
os.chdir`を試す
OS.chdir(path) 現在の作業ディレクトリを path に変更します。利用可能です。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
os.chdir`を試す
OS.chdir(path) 現在の作業ディレクトリを path に変更します。利用可能です。Unix, Windows。
もしかしたら、これはあなたが求めているものかもしれません。
作業ディレクトリを設定するには