Home > other >  PYTHON is a small white consult sys. Exit (app. Exec_ ()) how to coexist with other while loop?
PYTHON is a small white consult sys. Exit (app. Exec_ ()) how to coexist with other while loop?

Time:12-13

The following is a part of the program
# run window
If __name__=="__main__" :
# fixed, PyQt5 procedures require the QApplication object, sys. Argv is a command line argument list, ensure that the program can run double-click
App=QApplication (sys. Argv)
# initialization
MyWin=MyMainForm ()
# will be displayed on the screen window controls
MyWin. The show ()
# monitor_webpage is a function of a while loop structure
If myWin. Auto_run_ignition_tool () :
Monitor_webpage ()
# program running and sys. Exit infinite loop monitoring screen,
Sys. Exit (app. Exec_ ())

Goal:
After running the program window opens, click on the button in the window automatically perform landing page control procedure, after the completion of the automatic landing run monitor_webpage () function, but the function is a function of the while loop structure, used for real-time monitoring the page content a value change; So the question I'm here, I want both real-time monitoring web content, and want to window display always waiting for commands, how to solve the
Problem:
1. When I start the program, writing good QT designe popup Windows, but shows no resoponding, jammed state, doubt sys. Exit (app) exec_ () with my monitor_webpage () cannot run at the same time;
  • Related