Python/Tkinter crash.

Hendrik van Rooyen mail at microcorp.co.za
Thu Oct 5 00:58:32 EDT 2006


 "Russell E. Owen" <rowen at cesmail.net> wrote:


> In article <mailman.1242.1159951684.10491.python-list at python.org>,
>  "Hendrik van Rooyen" <mail at microcorp.co.za> wrote:
>
> >Hi,
> >
> >I get the following:
> >
> >hvr at LINUXBOXMicrocorp:~/Controller/lib> python display.py
> >UpdateStringProc should not be invoked for type font
> >Aborted
> >...
> >Everything seems to work fine. - there is a thread that runs to move the
meter
> >values around continuously, and this has been stable for some time now, and I
> >can get the various "machine" parts to move around the screen by pushing the
> >buttons...
>
> You mention threads several times in your posting. Do you have multiple
> threads talking to Tkinter? If so, try recoding to avoid this (e.g. by
> having the background threads communicate with the main thread via
> Queues).
>
> -- Russell

I am not sure how to do this - once I have called the Tkinter mainloop - that
main thread is essentially event driven - and figuring out how to get it to poll
a queue for content is not obvious - I suppose I could arrange some external
wake up event that I could activate to make it look at the queue - must read up
on this...

Thanks it is a good idea as it will make the interface cleaner, and as I have to
sort out inter process communication anyway it will make sense to also use a
queueing mechanism between the threads in this display process.

There is already one queue defined - but its a hack as I use it to pass the main
threads id to get around the problem of referring to a class before its
defined...

- Hendrik





More information about the Python-list mailing list