equivalent to Tcl 'after' command?
Diez B. Roggisch
deetsNOSPAM at web.de
Thu Apr 22 13:59:31 EDT 2004
> after 1000 {puts "one second has elapsed"}
>
> 1. What's the most canonical way of doing this?
>
> 2. What's the best reference that talks about non-gui event loop
> programming in Python?
Has been a while since I used tcl/tk, so I'm a bit rusty here. But AFAIK
that after stuff was needed when the tk event loop took over control. Sooo
- _if_ you use a toolkit, it most probably features such a facility.
In python, such stuff is usually accomplished using threads - and since a
recent version, there is the module sched. Which internally uses threads. I
personally ripped the webware taskkit for recurrent tasks.
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list