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?

4 years ago
OpenStudy (espex):

Is that the only line of code in your program?

4 years ago
OpenStudy (anonymous):

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

4 years ago
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.

4 years ago
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 }$$

4 years ago
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!

4 years ago