mfryf

>>> import os
>>> homedir = os.getcwd()
>>> print homedir
D:\python\test

>>>

>>> import sys
>>> print sys.argv[0]
D:\python\test\temp.py
>>> print os.path.abspath(sys.argv[0])
D:\python\test\temp.py
>>>

分类:

技术点:

相关文章:

  • 2021-09-22
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2023-01-31
  • 2021-11-23
  • 2021-11-23
  • 2021-11-23
  • 2021-10-05
相关资源
相似解决方案