python使用相对路径问题

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/djshichaoren/article/details/83338739

如果使用python相对路径,一定要知道当前路径。因为相对路径相对的就是当前路径。

(1)Edit configurations

(2)working directory中就是当前的地址了

然后就可以通过

path='./xxx/xxx/xxx'

来设置相对地址了

猜你喜欢

转载自blog.csdn.net/djshichaoren/article/details/83338739
今日推荐