对 python 2使用execfile:
>>> execfile('C:\test.py')
对 python 3 使用exec
>>> exec(open("C:\test.py").read())
上一篇 f.read空了
下一篇 Python:日志记录模块-全局
版权所有 (c)2021-2022 MSHXW.COM
ICP备案号:晋ICP备2021003244-6号