title: Using pynput to get mouse coordinates
body: <p>The program runs, but onclick I do not get a print statement of my x, and y.</p>
  <p>I built a simple MoustInput class like so</p>
  <pre><code>from pynput import mouse
      
  class MouseInput:
          def __init__(self):
              with mouse.Listener(on_click=self.on_click) as listener:
                  listener.join()
      
          def on_click(self, x, y, button, pressed):
              print('{0} at {1}'.format(
                  'Pressed' if pressed else 'Released',
                  (x, y)))
              if not pressed:
                  # Stop listener
                  return False
  </code></pre>
  <p>and then in app.py
  I have something like this to call the class</p>
  <pre><code>from MouseInputs.mouse_input import MouseInput
  
  
  if __name__ == &quot;__main__&quot;:
      MouseInput()
  </code></pre>