fix cgitb
This commit is contained in:
parent
393402df60
commit
e8c092a351
14 changed files with 14 additions and 14 deletions
|
@ -163,7 +163,7 @@ class OpencvWidget(QLabel):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = OpencvWidget()
|
w = OpencvWidget()
|
||||||
w.show()
|
w.show()
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Window(QWidget, QCursorGif):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -141,7 +141,7 @@ class Window(QWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Window(QWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, 'text')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -79,7 +79,7 @@ class Window(QListWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
# 通过qss改变按钮的高度
|
# 通过qss改变按钮的高度
|
||||||
|
|
|
@ -70,7 +70,7 @@ class Window(QWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, 'text')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -220,7 +220,7 @@ class Window(QWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -139,7 +139,7 @@ class Window(QWidget, Ui_FormSerialPort):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -78,7 +78,7 @@ class DemoWindow(QWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = DemoWindow()
|
w = DemoWindow()
|
||||||
|
|
|
@ -75,7 +75,7 @@ class Window(QWidget):
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import sys
|
||||||
import cgitb
|
import cgitb
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
from PyQt5.QtWidgets import QApplication
|
from PyQt5.QtWidgets import QApplication
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
|
|
|
@ -185,7 +185,7 @@ if __name__ == "__main__":
|
||||||
# 开启F12 控制台功能,需要单独通过浏览器打开这个页面
|
# 开启F12 控制台功能,需要单独通过浏览器打开这个页面
|
||||||
# 这里可以做个保护, 发布软件,启动时把这个环境变量删掉。防止他人通过环境变量开启
|
# 这里可以做个保护, 发布软件,启动时把这个环境变量删掉。防止他人通过环境变量开启
|
||||||
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = '9966'
|
os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = '9966'
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
w.show()
|
w.show()
|
||||||
|
|
|
@ -68,7 +68,7 @@ class WebView(QWebView):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = WebView()
|
w = WebView()
|
||||||
w.show()
|
w.show()
|
||||||
|
|
|
@ -165,7 +165,7 @@ class Window(QWidget):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, '')
|
cgitb.enable(1, None, 5, '')
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
w = Window()
|
w = Window()
|
||||||
w.show()
|
w.show()
|
||||||
|
|
|
@ -132,7 +132,7 @@ if __name__ == '__main__':
|
||||||
import cgitb
|
import cgitb
|
||||||
import os
|
import os
|
||||||
os.makedirs('tmp', exist_ok=True)
|
os.makedirs('tmp', exist_ok=True)
|
||||||
sys.excepthook = cgitb.enable(1, None, 5, 'text')
|
cgitb.enable(1, None, 5, '')
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
loop = QEventLoop(app)
|
loop = QEventLoop(app)
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
|
|
Loading…
Reference in a new issue