📜  python set cwd to script directory - Python代码示例

📅  最后修改于: 2022-03-11 14:46:53.186000             🧑  作者: Mango

代码示例2
abspath = os.path.abspath(__file__)
dname = os.path.dirname(abspath)
os.chdir(dname)