title: "Where is the Mouse Right Now?"
body: <p>I'm trying to write a program that will constantly display x- and y- coordinates of the mouse cursor as I move it around(Automate the boring stuff in python page 417).</p>
  
  <p>I have tried adjusting indentation of the Try statements,but I was still
  receiving indentation error message.</p>
  
  <pre><code>import pyautogui
  
  print('press Ctrl-C to quit.')
  
  try:
  
      while True:
  
  except KeyboardInterrupt:
  
       print('\nDone.')
  
          x,y=pyautogui.position()
  
          positionStr='X: ' + str(x).rjust(4) + 'Y: ' + str(y).rjust(4)
  
          print(positionStr,end='')
  
          print('\b'*len(positionStr),end='',flush=True)
  </code></pre>
  
  <p>I expected an output of two lines like below:</p>
  
  <p>press Ctrl-C to quit.
  X:290 Y:424</p>
  
  <p>But the output I got was :</p>
  
  <pre><code> File "&lt;ipython-input-2-b3f3ee266ed5&gt;", line 6
  
      except KeyboardInterrupt:
                               ^
  IndentationError: expected an indented block
  </code></pre>