[Python编程(第4版)].(Programming.Python.4th.Edition).Mark.Lutz.文字版

(yzsuai) #1

GUI itself—the GUI responds to moves, redraws, and resizes during the transfers.
Other transfers such as mail deletes must run all by themselves and disable other trans-
fers until they are finished; deletes update the inbox and internal caches too radically
to support other parallel operations.


On systems without threads, PyMailGUI instead goes into a blocked state during such
long-running operations (it essentially stubs out the thread-spawn operation to perform
a simple function call). Because the GUI is essentially dead without threads, covering
and uncovering the GUI during a mail load on such platforms will erase or otherwise
distort its contents. Threads are enabled by default on most platforms that run Python
(including Windows), so you probably won’t see such oddness on your machine.


Figure 14-8. Nonblocking progress indicator: Load


Figure 14-9. Nonblocking progress indicator: View


1028 | Chapter 14: The PyMailGUI Client

Free download pdf