olpcgames SVGSprite bug + fix
alev742 at gwu.edu
Tue Jul 22 13:31:00 EDT 2008
I've been using olpcgames for some physics + puzzle games I'm writing. I
just started using the SVGSprite class but I kept on getting an error when
using it. I realized that in the SVGSprite class a module named 'svg' is
imported, AND a local variable is named svg. So when you call svg.render()
it tries it on the local variable (which is a string) and then that causess
The fix is easy, change the line at the top of svgsprite.py from:
from olpcgames import svg
from olpcgames import svg as svgModule
and then later in the code there is one reference to svg that needs to be
changed to svgModule.
Basically just a python scope issue, but I don't know who maintains
olpcgames so I decided to just send this to devel.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel