我有一个exe使用 PyInstaller 生成的文件的 AntiVirus 误报问题,通过搜索,我发现这个答案包含重新编译引导加载程序,但我无法完成。这是我到目前为止尝试过的:
python ./waf distclean all得到错误can't open file './waf': [Errno 2] No such file or directory或者也许有另一种方法可以使可执行文件不被检测为病毒/木马。
使用的软件包:PyQt5、pysnmp、pandas、numpy。
编辑:
感谢@Ana Knickerbocker 的回答,我能够取得进展,现在当我运行时python ./waf all出现错误:
Python Version : 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)]
Checking for 'msvc' (C compiler) : not found
Checking for 'gcc' (C compiler) : not found
Checking for 'clang' …
我有一个 GUI,我需要使用 Qtimer 不断更新,因为我使用工作 Qthread,这是我的代码:
from PyQt5.QtWidgets import QApplication, QPushButton, QWidget
from PyQt5.QtCore import QThread, QTimer
import sys
import threading
class WorkerThread(QThread):
def run(self):
print("thread started from :" + str(threading.get_ident()))
timer = QTimer(self)
timer.timeout.connect(self.work)
timer.start(5000)
self.exec_()
def work(self):
print("working from :" + str(threading.get_ident()))
QThread.sleep(5)
class MyGui(QWidget):
worker = WorkerThread()
def __init__(self):
super().__init__()
self.initUi()
print("Starting worker from :" + str(threading.get_ident()))
self.worker.start()
def initUi(self):
self.setGeometry(500, 500, 300, 300)
self.pb = QPushButton("Button", self)
self.pb.move(50, 50)
self.show()
app = QApplication(sys.argv)
gui = MyGui()
app.exec_() …Run Code Online (Sandbox Code Playgroud)