python run binary application in memory and return output
本问题已经有最佳答案,请猛点这里访问。
我想用
实际代码:
1 | subprocess.Popen('dmidecode.exe -s system-uuid'.split()) |
使用
1 2 3 4 | import subprocess out = subprocess.check_output('dmidecode.exe -s system-uuid').decode('utf-8').strip() print('system uuid:', out) # system uuid: 6ba7b810-9dad-11d1-80b4-00c04fd430c8 |