triangle setwidth( triangle draw(winbesides changing the style of text objectthe text itself may be changedmessage settext('click anywhere to quit'then lines responding to this promptwin getmouse(win close(if you want to use an existing text object to display the quitting promptas did herei provide variation on my window closing method that could replace the last three lineswin promptclose(messagean existing text object may be given as parameter rather than coordinates for new text object the complete code with that substitution is in triangle py if you want to make regular polygons or starsyou need some trigonometrynot required for this tutorialbut you can see its use in example polygons py windows operating system specializationpyw this windows-specific section is not essential it does describe how to make some windows graphical programs run with less clutter if you ran the triangle py program by double clicking its icon under windowsyou might have noticed console window first appearingfollowed by the graphics window for this programthere was no keyboard input or screen output through the console windowso the console window was unused and unnecessary in such casesunder windowsyou can change the source file extension from py to pywsuppressing the display of the console window if you are using windowschange the filename triangle py to triangle pywdouble click on the icon in its directory folderand check it out the distinction is irrelevant inside idlewhich always has its shell window graphics py vs event driven graphics this optional section only looks forward to more elaborate graphics systems than are used in this tutorial one limitation of the graphics py module is that it is not robust if graphics window is closed by clicking on the standard operating system close button on the title bar if you close graphics window that wayyou are likely to get python error message on the other handif your program creates graphics window and then terminates abnormally due to some other errorthe graphics window may be left orphaned in this case the close button on the title bar is importantit is the easiest method to clean up and get rid of the windowthis lack of robustness is tied to the simplification designed into the graphics module modern graphics environments are event driven the program can be interrupted by input from many sources including mouse clicks and key presses this style of programming has considerable learning curve in zelle' graphics packagethe complexities of the event driven model are pretty well hidden if the programmer wants user inputonly one type can be specified at time (either mouse click in the graphics window via the getmouse methodor via the input keyboard entry methods into the shell window graphics