wwwwtt

学习记录--持续更新

import os


# 读取项目的绝对路径
BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 读取当前文件的绝对路径
base_path = os.path.abspath(__file__)
#
base_path2 = os.path.realpath(__file__)
# 读取当前文件的的目录
base_path1 = os.path.dirname(__file__)

print(BASE_PATH)
print(base_path)
print(base_path1)
print(base_path2)

 

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-12-10
  • 2021-12-10
  • 2021-11-23
  • 2021-11-23
相关资源
相似解决方案