ANN: Creating GUI Applications with wxPython

Dietmar Schwertberger maillist at schwertberger.de
Wed Feb 27 15:17:01 EST 2019


On 27.02.2019 20:34, Dan Sommers wrote:
> What is a "network widget" in this context?  Application
> users don't usually interact with "the network" directly,
> and networks are usually on the opposite end of applications
> from the GUI.  What would your hypothetical network widget
> do?  What cross-platform differences would it abstract/hide?
> What do your applications do to/with/against "the network"?

Probably an integration of sockets with the main loop to allow for 
asynchroneous communication.
Qt has a socket class that will deliver events when data is received or 
transmitted. It's a long time that I had a look at this, but I think 
it's available from PyQt as well.
Alternatively, I have successfully used Quamash, which is an integration 
of the Qt event loop with asyncio.

For new projects, I would always recommend to use asyncio as this is 
available in the standard library.

For wxPython there is some code to integrate with asyncio, but I have 
never used this myself.

Alternatively, the communication can always be placed into a separate 
thread, posting events to the main application / frontend.

Regards,

Dietmar




More information about the Python-list mailing list