[PyKDE] network programming

Phil Thompson phil at river-bank.demon.co.uk
Sat Jan 13 00:41:59 GMT 2001


Frido Ferdinand wrote:
> 
> Hi,
> 
> A short question but I'm sure the answer is pretty complex. What is
> currently the best way to do asynchronous (I think that's the correct
> term) network connections ? I'm currently building an app that makes
> lot's of network operations and when there's no data coming in the whole
> GUI blocks. It's comparable to Netscape when it's trying to resolve a
> hostname and doesn't update the GUI. I've read in the QT doc's that
> there is quite a nice framework for doing this (QNetworkProtocol,
> QNetworkOperation) but I'm not sure if PyQT supports this. Are there
> any other alternative's ?

Look at QSocket, QServerSocket and (particularly) QSocketNotifier. I
didn't implement the first two until fairly recently as Python has its
own portable socket interface. Then I found out the hard way that it's
not as portable as it first appears. Fortunately the Qt classes are much
better.

Phil




More information about the PyQt mailing list