Skip to content

Instantly share code, notes, and snippets.

@neilmanuell
Last active February 29, 2016 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilmanuell/f37246aefb56553e2bc4 to your computer and use it in GitHub Desktop.
Save neilmanuell/f37246aefb56553e2bc4 to your computer and use it in GitHub Desktop.
immutable int problem
import pyglet
def update_image(dt):
img = pyglet.image.load(image_paths[count])
#... do other stuff
count += 1 #cant do this cause its immutable
count = 60
image_paths = get_image_paths() # returns a list
pyglet.clock.schedule_interval(update_image, 0.11)
pyglet.app.run()
@neilmanuell
Copy link
Author

Shoudl be def update_image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment