same single event loop in single process pydrawpainting and moving graphics introduced simple tkinter animation techniques (see the tour' canvasdraw variantsthe pydraw program listed here builds upon those ideas to implement more feature-rich painting program in python it adds new trails and scribble drawing modesobject and background color fillsembedded photosand more in additionit implements object movement and animation techniques--drawn objects may be moved around the canvas by clicking and draggingand any drawn object can be gradually moved across the screen to target location clicked with the mouse running pydraw pydraw is essentially tkinter canvas with keyboard and mouse event bindings to allow users to perform common drawing operations this isn' professional-grade paint programbut it' fun to play with in factyou really should--it is impossible to capture things such as object motion in this book start pydraw from the launcher bars (or run the file movingpics py from example - directlypress the key to view help message giving available commands (or read the help string in the code listingsfigure - shows pydraw after few objects have been drawn on the canvas to move any object shown hereeither click it with the middle mouse button and drag to move it with the mouse cursoror middle-click the objectand then right-click in the spot you want it to move toward in the latter casepydraw performs an animated (gradualmovement of the object to the target spot try this on the picture shown near the top of the figure--it will slowly move across your display press "pto insert photosand use left-button drags to draw shapes (note to windows usersmiddle-click is often either both mouse buttons at once or scroll wheelbut you may need to configure this in your control panel in addition to mouse eventsthere are key-press commands for tailoring sketches that won' cover here it takes while to get the hang of what all the keyboard and mouse commands dobut once you've mastered the bindingsyou too can begin generating senseless electronic artwork such as that in figure - pydraw source code like pyeditpydraw lives in single file two extensions that customize motion implementations are listed following the main module shown in example - complete gui programs