简体   繁体   中英

Executing/opening a file using PyQT?

我想从正在编写的程序中执行/打开一个.exe文件。现在,PyQT Designer仅用于GUI,但如何将文件与希望用户单击的特定UI元素相关联,以及查看文件?

You can open it using subprocess module in python:

import subprocess
subprocess.call('path/to/exe/file')

This will launch the exe file

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM