Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 9 Online
OpenStudy (anonymous):

Hi everyone, I'm having a little trouble on assignment 4.2 - the one involving drawing the wheel. When I run the line of code: new_win = GraphWin('A Car', 700, 300) in the shell to test my code, a window [which is definitely smaller than 700x300 pixels] opens up and the new window stops responding. I've looked through my computer to try and find the problem, but I can't seem to figure out what it is. Any ideas?

OpenStudy (espex):

Is that the only line of code in your program?

OpenStudy (anonymous):

That's the only line I tested. It opens a blank window with the title and (Not Responding) next to it.

OpenStudy (espex):

Part of your issue could be from an incomplete series of code. If the process is waiting to grab a handle for the window, or to be populated by some other data. It is possible that you are creating problems where there are none. Have you tried creating a complete main to generate a window? Look at the python docs for an example program that you know works and test that.

OpenStudy (espex):

For what it is worth, these warnings are issued concerning the graphics.py Warning It is particularly important in Microsoft Windows with the graphics not to open Idle from the Start menu. Graphics will fail. Use one of the following two methods. Warning To work on the most systems, this version of graphics.py cannot be used from the Idle shell. There is an issue with the use of multiple threads of execution. \(\small{source: http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/graphics.html }\)

OpenStudy (anonymous):

I was trying to run the code in IDLE, not the command window. As soon as I ran it in the command window, everything worked fine. I should have looked at the tutorial before I asked the question. Thanks so much!

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!
Latest Questions
HeyItsAlicia: Why was questioncove not working??
2 hours ago 2 Replies 1 Medal
Countless7Echos: Ah trying out the whole T.V girl drawing :p (I love drawing eyes)
12 hours ago 14 Replies 6 Medals
kaelynw: starting to draw a hand
2 days ago 17 Replies 2 Medals
Twaylor: Rate it :D (Took 2 days)
6 days ago 7 Replies 0 Medals
XShawtyX: Art, Short Writing Assignment: Imagining Landscapes
2 days ago 9 Replies 1 Medal
XShawtyX: Chemistry, Help ud83dude4fud83cudffe
1 week ago 13 Replies 1 Medal
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!