I think your advice wil be quite helpful, it wil take some rereading and googling, but thank you.<br><br><div><span class="gmail_quote">On 12/18/05, <b class="gmail_sendername">David Boddie</b> <<a href="mailto:david@boddie.org.uk">
david@boddie.org.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Fri, 16 Dec 2005, Arthur Pemberton wrote:<br><br>
> Ideally, the console client would be simply a downloader, while the GUI<br>> would use the same mechanisms to access the data, but give more<br>> interactivty (renaming, prioritizing of downloads, etc.) Not sure if this
<br>> is the information you meant that was missing.<br><br>OK. So you could implement the downloader in such a way that makes it<br>fairly independent from the way it was invoked. Perhaps it would perform<br>blocking network operations using modules from the Python standard library,
<br>or maybe you would provide a way for the main application to monitor its<br>progress and interrupt it if required.<br><br>Keeping the GUI interactive while a long-term operation is being performed<br>can be a challenge, especially if the control isn't returned until the
<br>operation is finished. There are ways to ensure that the GUI interface is<br>refreshed while this occurs: by calling QApplication.processEvents() or<br>by performing the operation in a separate thread.<br><br>Note that GUI programming has to be performed in the main thread - you can't
<br>(easily) make calls to PyQt from a separate thread.<br><br>If the console-only version of the client doesn't use PyQt, and you want to<br>use the same implementation in the GUI client, you can probably use Python's<br>
threading module to run the downloader in a separate thread. I guess this<br>should work with PyQt for Qt 3 as long as you don't use the Qt's threading<br>features. You may not use threading in the console-only client - users may be
<br>satisifed with a client that only provides feedback once it is finished.<br><br>I hope this advice is helpful, even if it is a bit vague. I'm sure others<br>will correct me if what I've said is confusing.<br><br>David
<br><br>_______________________________________________<br>PyKDE mailing list <a href="mailto:PyKDE@mats.imk.fraunhofer.de">PyKDE@mats.imk.fraunhofer.de</a><br><a href="http://mats.imk.fraunhofer.de/mailman/listinfo/pykde">
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde</a><br></blockquote></div><br><br clear="all"><br>-- <br>As a boy I jumped through Windows, as a man I play with Penguins.