Print statement and multithreading
Roy Katz
katz at Glue.umd.edu
Tue Aug 22 16:54:48 EDT 2000
Hi..
After listening to your suggestions I came up with the following model:
In my bookmark-checking utility, there are a variable number of threads
going about processing the links. The main thread, after launching the
processing threads, goes into a loop which monitors their progress. My
problem is that this main thread doesn't display output to the screen. I
managed to force it to by adding a sys.stdout.flush() (note: the outputted
lines do not end in a '\n' -- perhaps a '\n' character forces a flush??)
Thanks,
Roey
PS: If you want to see the link-checker, I will be glad to mail it to
you. Actually, come to think about it, perhaps I should get it onto the
Vaults of Parnassus. The only thing the linkchecker still lacks is the
code to write updated links back to a netscape bookmark file.
More information about the Python-list
mailing list