Presley-lpc

一、打印相对路径

  print(__file__)

二、打印绝对路径

  import os 

  print(os.path.abspath(__file__))

三、打印文件名

  import os 

  print(os.path.dirname(os.path.abspath(__file__)))

分类:

技术点:

相关文章:

  • 2021-11-27
  • 2021-11-27
  • 2021-11-27
  • 2021-10-27
  • 2021-09-29
  • 2021-05-29
  • 2021-11-23
猜你喜欢
  • 2021-09-14
  • 2021-09-21
  • 2021-12-07
相关资源
相似解决方案