rotating images

Alex Martelli aleax at aleax.it
Sun Jan 20 11:04:18 EST 2002


Ed wrote:

> How can I rotate images from a list every 2s interval in Tkinter?

To rotate an image you can use PIL, see e.g.:
http://www.pythonware.com/library/pil/handbook/tutorial.htm

To perform a task after X milliseconds from now, you can use the .after
method of every Tkinter widget, see e.g:
http://www.faqts.com/knowledge_base/view.phtml/aid/4340

Note that this doesn't install your callback for perioding repetition, but
only one-shot; the callback calls after again if it needs to be repeated
once again.

To repeatedly operate on every item of a list in Python, you can use
Python's for statement.


Alex




More information about the Python-list mailing list