解决方案是使用
__file__
import osTEST_FILENAME = os.path.join(os.path.dirname(__file__), 'test.txt')
上一篇 如何将numpy.linalg.norm应用于矩阵的每一行?
下一篇 'str'对象没有属性'decode'。Python 3错误?
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号