# This program creates a graphics window with a rectangle. It provides the 3 # template used with all of the graphical programs used in the book. 4 # 5 6 from graphics import GraphicsWindow 7 8 # Create the window and access the canvas. 9 win = GraphicsWindow() 10 canvas = win.canvas() 11 12 # Draw on the canvas. 13 canvas.drawRect(5, 10, 20, 30) 14 15 # Wait for the user to close the window. 16 win.wait()
*This is the error I get* Traceback (most recent call last): File "C:/Users/Nicolae/AppData/Local/Programs/Python/Python35/pythonK/pr.py", line 1, in <module> from graphics import GraphicsWindow ImportError: No module named 'graphics' *And when I installed graphic library the error was :* Traceback (most recent call last): File "C:/Users/Nicolae/AppData/Local/Programs/Python/Python35/pythonK/pr.py", line 1, in <module> from graphics import GraphicsWindow ImportError: cannot import name 'GraphicsWindow' -- https://mail.python.org/mailman/listinfo/python-list