[Orbit-python-list] mainloop...
Status: Inactive
Brought to you by:
tack
|
From: Brian C. <bc...@th...> - 2002-02-07 21:07:56
|
I don't think this mainloop issue has to be so complicated.
Here's a bit of code that runs the pygtk main loop w/o halting the interpreter:
while 1:
if gtk.events_pending():
gtk.mainiteration(0)
else:
time.sleep(0.2)
Just implementing two equivalent calls for orbit-python would allow python,
orbit, and gtk to all coexist, something like this:
while 1:
i = 1
if gtk.events_pending():
gtk.mainiteration(0)
i = 0
if orb.events_pending():
orb.mainiteration(0)
i = 0
if i:
time.sleep(0.1)
Is there some problem here I'm overlooking?
b.c.
|