bootkey wrote: > I've installed pyglet on WinXP and I'm trying to run Hello World as > follows: > > import pyglet > win = pyglet.window.Window() >
Both pyglet and pyglet.window are modules and must be imported. Try import pyglet.window after the first import. Also: I've got two different versions of pyglet (neither of them being that latest version) installed on two different platforms (Linux and Windows). In one case the single import works (and apparently does the second import automatically), and in the other case I need to explicitly perform the second import. So... your mileage may vary depending on your pyglet version and your platform. Gary Herron > 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 > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
