title: How to use os.startfile with a button command (TkInter)
body: <p>Trying to implement a button onto a canvas which opens a <code>.pdf</code> file when clicked.</p>
  
  <p>My attempt is as follows</p>
  
  <pre><code>self.B3 = Button(InputFrame,text='Graphical Plots', command = os.startfile('Bessel.pdf'),bd=5,width=13,font="14")
  self.B3.grid(column =0,row=3)
  </code></pre>
  
  <p>Unfortunately my code opens the <code>.pdf</code> file before I have clicked the button, as soon as it has run. Why? </p>