Writing python In the code , Always pop up a window to prompt the information , Because sometimes I use more than one at the same time ui frame , such as tkinter,pyqt etc. , Often can not find the appropriate pop-up module . So I combed several pop-up schemes .
One 、 use windows Self contained api( Import required win32api)
Special emphasis is placed on the adoption of this scheme , The advantage of this scheme is the pop-up mode , The main window is not required .
Two 、 use tkinter The built-in message pop-up module ( Import required tkinter)
You can see , use tkinter The built-in message pop-up module , Create a pop-up window and he , There must be a parent window displayed , This is a very big failure , So unless your project has adopted tkinter Of UI To draw the main window , Otherwise, this pop-up method is not recommended .
3、 ... and 、 use pyqt Message pop-up module ( Import required pyqt)
It can be seen that pyqt We have to introduce a lot of Solutions pyqt Module library for , Declaration initialization must also be passed in widget perhaps window The handle of