I'm trying to use the exec command in python to try to get a function to call on different dictionaries and functions as needs change without making my program bigger than it needs to be. Unfortunately I keep getting this error:
File "Game Files\Intro.py", line 214, in Anim
exec compile('%slegs = ImageTk.PhotoImage(Sprite%s["legs0"])'%(name,name), '<string>', 'exec') in Anim
TypeError: exec: arg 2 must be a dictionary or None
are the args 'compile' and 'in Anim', or is there something else I'm missing?
1 Year Ago
Related Article:python,tkinter, moving an object
is a solved Python discussion thread by Thropian that has 7 replies, was last updated 1 year ago and has been tagged with the keywords: python, tkinter.