954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

GIFs in a Dict

Is it possible to use files such as GIF files as a value in a Python Dict; that is, is it possible to use GIF files in a Dict and access them directly, rendering them to the screen via Tkinter.

I have a group of GIF files I plan to use in a GUI-based Python program. I will need to access these GIFs based on the results of a RNG. At this point, using a dict seems the most promising considering the use of the "key", but I am not sure.

What is the best way in Python to group image files into a group, an array of images to possibly use within a program?

Regards, and TY in advance.

sharky_machine

mattyd
Posting Maven
2,607 posts since Oct 2006
Reputation Points: 105
Solved Threads: 1
 

Take a look at:
http://www.daniweb.com/techtalkforums/post257347-78.html
that Tkinter cardgame example uses a card_name:image_object dictionary.

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You