hi, using 1.1beta2, I try to run this (from /site-packages/pyglet/docs/
doc/html/api/pyglet.sprite-module.html):
'''The following complete example loads a "ball.png" image and creates
a sprite for that image. The sprite is then drawn in the window's draw
event handler:'''
#!/usr/bin/env python
import pyglet
ball_image = pyglet.image.load('ball.png')
ball = pyglet.sprite.Sprite(ball_image, x=50, y=50)
window = pyglet.window.Window()
@window.event
def on_draw():
ball.draw()
pyglet.app.run()
However I get this error:
>C:\Python25\pythonw -u "pyglet.py"
Traceback (most recent call last):
File "pyglet.py", line 3, in <module>
import pyglet
File "C:\Documents and Settings\GO\My Documents\python\pyglet.py",
line 5, in <module>
ball_image = pyglet.image.load('ball.png')
AttributeError: 'module' object has no attribute 'image'
Additionally, if I then open up a Python interpreter and 'import
pyglet', I get:
>>> import pyglet
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Documents and Settings\GO\My Documents\python\
<module>
ball_image = pyglet.image.load('ball.png')
AttributeError: 'module' object has no attribute 'image'
Checking the pyglet installation there is an image module. When this
first happened I uninstalled through the Windows add/remove programs
panel and deleted the pyglet directory, then reinstalled with the .msi
file -- does someone know what the problem and solution are here?
thanks, George
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---