title: Python Button Bind two functions and send arguments with the binding
body: <p>I am somewhat new to python still, and am working on a project including a GUI. I using with Tkinter and buttons a lot, and am curious if there was a way to run a function with a bind because I want one thing to happen when it is presses and something else when it is released.</p>
  
  <pre><code>        s = str(x+1) + ":" + str(y+1)
          img = ImageTk.PhotoImage(Image.open('button.png'))
          b = Tkinter.Button(field_hid, image=img, borderwidth=0, highlightthickness=0, background='grey')
          b.bind("&lt;ButtonPress-1&gt;", lambda s=s, button=b: location_down(event,s,button))
          b.bind("&lt;ButtonRelease-1&gt;", lambda s=s, button=b: location_up(event,s,button))
          b.img = img
          b.pack()
          b.grid(row=x, column=y)
  </code></pre>
  
  <p>I don't understand how I am to do this, as the only thing that can be passed to the function is the event, but my program requires the arguments. </p>