A few things...I think it's not hitting your check function because
you never call clock.tick().  And then, you're using clock.schedule
which takes only the function as an argument.  Try this:


from pyglet import clock
from pyglet import font
from pyglet import window

win = window.Window()

ft = font.load('Arial',36)

text = font.Text(ft,'Hello World')



def check(dt):
    print 'hi there'

clock.schedule_interval(check,2.0)

while not win.has_exit:
    dt=clock.tick()
    win.dispatch_events()
    win.clear()
    text.draw()
    win.flip()

On Nov 28, 4:17 pm, sol <[EMAIL PROTECTED]> wrote:
> Do the clock.schedule and clock.schedule_once functions work on XP?
> They do not seem to work for me. For example the following code never
> seems to call my 'check' callback and therefore never prints  "HI
> THERE":
>
> from pyglet import clock
> from pyglet import font
> from pyglet import window
>
> win = window.Window()
>
> ft = font.load('Arial', 36)
> text = font.Text(ft, 'Hello, World!')
>
> def check(dt):
>         print "HI THERE"
>
> clock.schedule(check,2000)
>
> while not win.has_exit:
>     win.dispatch_events()
>     win.clear()
>     text.draw()
>     win.flip()
>
> Thanks in advance,
>
> Sol
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to