Threading and tkinter

gert gert.cuykens at
Sat Mar 7 04:20:53 CET 2009

On Mar 6, 7:42 pm, a... at (Aahz) wrote:
> [posted and e-mailed -- please reply to the group]
> In article <492d5db9-3681-4ae8-827e-f2a4f66be... at>,
> gert  <gert.cuyk... at> wrote:
> >After reading the docs and seeing a few examples i think this should
> >work ?
> This is a bit late, and I don't have time to review your code, but you
> should see a good example here:
> --
> Aahz (a... at           <*>
> "All problems in computer science can be solved by another level of    
> indirection."  --Butler Lampson

Witch basically translate into stop being a smart ass and just do
this :)

from tkinter import *

def weegbrug():
    with open('com1','r') as f:
         for l in f:
    root.after(500, weegbrug)

root = Tk()
v = StringVar()
txt = Label(root, textvariable=v, width=800, height=600, bg="yellow",
font=("Helvetica", 300))
txt.pack(expand=YES, fill=BOTH)
root.geometry("%dx%d+0+0" % (root.winfo_screenwidth(),
root.after(500, weegbrug)

More information about the Python-list mailing list