[Tutor] threading and gui programming

Ben nebpro at gmail.com
Fri Mar 23 17:20:48 CET 2007


Hi Tony,

Thank you very much for your pointer. I think I understand what are you
explaining to me. Do you mind give me some code examples? I am still trying
to grasp the gui programming overall. And it is really over my head. I
really appreciate your help. Thank you

-Ben

On 3/23/07, Tony Cappellini <cappy2112 at gmail.com> wrote:
>
> Hi Ben,
>
> I've just started gui programming in Python, and my first app needed a
> little threading.
> It's over my head, so a friend gave me an example, and I integrated it.
>
> The reason for threading in my example- is the same as what Kent
> mentioned.
>
> My app is a gui front end to another python program which processes files.
> The file processor outputs text, and my gui displays it in a text box.
> If it were not for threading, my app would freeze until the app that
> I'm calling finished.
>
> Another way to think of it- is using yourself for an example/.
> If you were eating dinner, and someone in the room called your name-
> you would probably turn your head or walk over to them while you were
> chewing a mouthfull :-)
>
> If you didn't respond to them until you were finished eating, they
> could not finish what they were doing either.
>
> Does that make sense?
>
> You may not always need threading in a gui app. It just depends on
> what you ar edoing, and how long it takes.
>
>
>
> Message: 1
> Date: Tue, 20 Mar 2007 14:49:50 -0400
> From: Ben <nebpro at gmail.com>
> Subject: [Tutor] threading and gui programming
> To: tutor at python.org
> Message-ID:
>        <e5f41cb30703201149h62446ce7t97bf028100c08503 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
>
> I am curious about one thing. I have been doing research on gui
> programming.
> One thing that I don't understand is why there are some examples uses
> threading in the gui examples. Is there any benefits or advantages for
> using
> the threading in the gui programming? Thanks.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070323/e0540a9e/attachment-0001.html 


More information about the Tutor mailing list