os.getcwd() 返回前工作目录
import os,sys
print("当前工作目录 : %s" % os.getcwd())
os.path.realpath(file)
os.path.dirname
os.chdir
os.chdir() 方法用于改变当前工作目录到指定的路径
os.getcwd() 返回前工作目录
import os,sys
print("当前工作目录 : %s" % os.getcwd())
os.path.realpath(file)
os.path.dirname
os.chdir
os.chdir() 方法用于改变当前工作目录到指定的路径