Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 13 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
curriful: Black QuestionCove Theme (WIP)
2 hours ago 16 Replies 1 Medal
Nina001: How do I make an image my background
4 hours ago 0 Replies 0 Medals
EdwinJsHispanic: imma sing notion
8 hours ago 13 Replies 0 Medals
EdwinJsHispanic: another song for someone
9 hours ago 66 Replies 5 Medals
MakaylaChuck23: I need tips on how to expand my English vocabulary
12 hours ago 13 Replies 2 Medals
jinxthelovely: does my essay look good ( its due at 12 tn )
12 hours ago 11 Replies 6 Medals
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!