Ask
your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
15 Online
Try to display image with following code: **** from graphics import * def main(): win = GraphWin("My Image",600,600) c = Image(Point(200,200),"a.gif") c.draw(win) win.getMouse() win.close() main() **** Then I get an error that I don't understand. Is graphics.py not finding the image file? Here is the error: NameError: global name '_root' is not defined
Still Need Help?
Join the QuestionCove community and study together with friends!
I suppose it's because it's supposed to be used as a class method instead?
I did try your code in idle, with a random image, the graphics.py found here : http://mcsp.wartburg.edu/zelle/python/graphics.py And everything works fine here...
Reinstalled graphics.py and now code works. Thanks.
Can't find your answer?
Make a FREE account and ask your own questions, OR help others and earn volunteer hours!
Join our real-time social learning platform and learn together with your friends!
Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol:
@tinydinoUwU stop trying to find a argument u blad lil boy
TinydinoUwU:
**(Verse 1)** Yo, trapped in a box, Iu2019m feelin' so confined, Lifeu2019s a game of chess, but Iu2019m stuck in rewind, Every dayu2019s a struggle, man, I
Arriyanalol:
hey umm so i need help with my lanauage art ixl anybody wanna help big mama
Nina001:
ho where do i go to buy Subscirption for a moving pfp because on my screen im on
1 day ago
5 Replies
4 Medals
10 hours ago
13 Replies
5 Medals
4 days ago
2 Replies
2 Medals
5 days ago
4 Replies
2 Medals