Continually check object status
Diez B. Roggisch
deets at nospam.web.de
Sat Aug 2 15:22:42 EDT 2008
> I was afraid that someone was going to mention threading. I have read
> about it before but not been able to do much with it.
>
> My ultimate goal is to create some sort of tamagotchi style virtual
> pet to interact with. Over time it gets hungry or bored, but the
> process can be fixed by a user "feeding" or "playing with" it. I
> wanted to take this opportunity to teach myself some PyGTK coding as
> well, but I thought that maybe I could build the creature object and
> looping in such a way that it would be possible to add a GUI to it
> later.
No, that's not possible. But when you use GTK, there are timer-functions
that let you register a timer event which will then invoke a callback in
which you can check whatever status you like.
Diez
More information about the Python-list
mailing list