[Tutor] Communicate between a thread and the main program

Glen Zangirolami glenbot at gmail.com
Mon Mar 8 17:52:55 CET 2010


I think you can use Queue to communicate between threads.

"The Queue module implements multi-producer, multi-consumer queues. It is
especially useful in threaded programming when information must be exchanged
safely between multiple threads"

http://docs.python.org/library/queue.html


On Mon, Mar 8, 2010 at 4:43 AM, Plato P.B. <platodreams at gmail.com> wrote:

>
> Hi all,
> I have created a script in which i need to implement the communication
> between the main program and a thread.
> The thread looks for any newly created files in a particular directory. It
> will be stored in a variable in the thread function. I want to get that name
> from the main program.
> How can i do it?
>
> Thanks in Advance. :D
> --
>
>
>
>
>
>
> Rgds..............
> Plato P.B.
> obscurant1st.biz/blog
>
> B'Lore  ( +919844882641)
> TsR I.    ( +919995317984)
> TsR II.   ( +919037036661)
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20100308/1d2fdeed/attachment.html>


More information about the Tutor mailing list