title: A painter example with tkinter in python
body: <p>Here is some code from <a href="http://www.python-course.eu/tkinter_canvas.php" rel="nofollow">http://www.python-course.eu/tkinter_canvas.php</a> :</p>
  
  <pre><code>canvas_height = 150
  
  def paint( event ):
     python_green = "#476042"
     x1, y1 = ( event.x - 1 ), ( event.y - 1 )
     x2, y2 = ( event.x + 1 ), ( event.y + 1 )
     w.create_oval( x1, y1, x2, y2, fill = python_green )
  
  master = Tk()
  master.title( "Painting using Ovals" )
  w = Canvas(master, 
             width=canvas_width, 
             height=canvas_height)
  w.pack(expand = YES, fill = BOTH)
  w.bind( "", paint )
  
  message = Label( master, text = "Press and Drag the mouse to draw" )
  message.pack( side = BOTTOM )
  
  mainloop()
  </code></pre>
  
  <p>It's supposed to create a painting app, but I got an error:</p>
  
  <pre><code>_tkinter.TclError: no events specified in binding
  </code></pre>