U .c@sHdZddlTd ddZd ddZddZed krDeZeeed S) ap turtle-example-suite: tdemo_paint.py A simple event-driven paint program - left mouse button moves turtle - middle mouse button changes color - right mouse button toggles between pen up (no line drawn when the turtle moves) and pen down (line is drawn). If pen up follows at least two pen-down moves, the polygon that includes the starting point is filled. ------------------------------------------- Play around by clicking into the canvas using all three mouse buttons. ------------------------------------------- To exit press STOP button ------------------------------------------- )*cCs(tdrttn ttdS)NZpendown)ZpenZend_fillZupZdownZ begin_fillxyr5/opt/alt/python38/lib64/python3.8/turtledemo/paint.py switchupdowns  rcCs(tddtddattddS)Nr)colorscolorrrrr changecolor sr cCs`tdtdtdtdddddgattd tttd tt d ttdd S) NZcircleuserg?ZredZgreenZblueZyellowrr Z EVENTLOOP) shapeZ resizemodeZ shapesizewidthr r rZ onscreenclickZgotor rrrrmain%s     r__main__N)rr)rr) __doc__Zturtlerr r__name__msgprintZmainlooprrrrs