old_contents: #! python3
  # mouseNow.py - Displays the mouse cursor's current position.
  import pyautogui
  
  print('Press Ctrl-C to quit.')
  try:
      while True:
          # Get and print the mouse coordinates.
          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)
  except KeyboardInterrupt:
      print('\nDone.')
  
new_contents: #! python3
  # P2_mouseNow.py - Displays the mouse cursor's current position.
  import pyautogui
  
  print('Press Ctrl-C to quit.')
  try:
      while True:
          # Get and print the mouse coordinates.
          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)
  except KeyboardInterrupt:
      print('\nDone.')
  
subject: Update P2_mouseNow added P2 prefix to filename in description