On Tue, Jun 10, 2008 at 1:54 PM, bootkey <[EMAIL PROTECTED]> wrote:
>
> I've installed pyglet on WinXP and I'm trying to run Hello World as
> follows:
>
> import pyglet
> win = pyglet.window.Window()
> label = pyglet.text.Label(\
>    'Hello, world',
>    font_name='Times New Roman',
>    font_size=36,
>    x=win.width//2, y=win.height//2,
>    anchor_x='center', anchor_y='center')
> @window.event
> def on_draw():
>    win.clear()
>    label.draw()
> pyglet.app.run()
>
> However, I get an error message saying " 'module' object has no
> attribute 'window' " in reference to the call to the Window()
> constructor.  Any help will be appreciated.
>
> Thanks,
> Jim Cook
>

Are you sure it's a problem with the window constructor?  Try changing
the on_draw decorator from @window.event to @win.event (it's referring
to the instance that you created...)

Colin

--~--~---------~--~----~------------~-------~--~----~
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