# File: ChapterGraphics/helloWin.py # Draw a window and click somewhere # in the place where you click it will write "Hello" from graphics import * def main(): win = GraphWin( "My first window", 400, 400 ) #size is 400x400 # initialize a text Object message = Text( Point(150,250), "Click in this window" ) message.draw( win ) p1 = win.getMouse() # returns a point - coords where you click message = Text( p1, "Hello!" ) # prints here in that point message.draw( win ) win.getMouse() # next click exits winodws win.close() main()