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

(1)Edit configurations

python使用相对路径问题

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

python使用相对路径问题

然后就可以通过

path='./xxx/xxx/xxx'

来设置相对地址了

相关文章:

  • 2022-12-23
  • 2021-04-22
  • 2021-05-18
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-01-10
猜你喜欢
  • 2022-02-07
  • 2021-12-11
  • 2021-05-26
  • 2021-08-12
  • 2021-07-31
相关资源
相似解决方案