请问python如何调用相对路径下的exe文件
最外层是一个大文件夹calculation,calculation里有一个change.py文件和一个子文件夹operation,operation里有一个cal.exe可执行文件,change.py任务就是调用cal.exe
代码为:
with os.popen(r'D:\calculation\operation\cal.exe', "r") as xxx:
xxx.read()
with os.popen(r'D:\calculation\operation\cal.exe', "r") as xxx:
xxx.read()