Thread Tkinter problem

Davy zhushenli at gmail.com
Wed Dec 3 22:23:11 EST 2008


On Dec 4, 9:08 am, Davy <zhushe... at gmail.com> wrote:
> On Dec 4, 11:13 am, "Hendrik van Rooyen" <m... at microcorp.co.za> wrote:>  "Davy" <zhushe... at gmail.com> wrote:
> > >     while(data_queue.full() == False):
>
> > This will fill the queue and stop.
> > Use while true and if queue not full...
>
> Hi Hendrik,
>
> It works, thank you:)
Add changed code:
//------code changed ---
def gen_board_thread():
    print 'enter here'
    gen_flip = 1
    while(True):
        time.sleep(0.3)
        if (data_queue.full() == False):
            if (gen_flip == 1):
                gen_flip = 0
                data = board_1
            else:
                gen_flip = 1
                data = board_2
            data_queue.put(data)
            print 'put', data_queue.qsize()
//--------------------
>
> Davy
>
>
>
>
>
> > - Hendrik- Hide quoted text -
>
> - Show quoted text -




More information about the Python-list mailing list