MouseInfo
MouseInfo (version 0.1.3) is a utility application that displays the XY coordinates of the mouse cursor and the RGB color information of the pixel beneath it. Designed for GUI automation planning, it functions across Windows, macOS, and Linux. The project is bundled with `PyAutoGUI` and appears to be in maintenance mode, with its last PyPI update in March 2020.
Warnings
- gotcha MouseInfo launches a graphical user interface (GUI) application that is blocking by default. When called from a Python script or interactive shell, the execution will pause until the MouseInfo window is manually closed.
- gotcha Users on macOS may encounter issues with `MouseInfo` (and underlying `PyAutoGUI` pixel functions) reporting incorrect RGB values or raising `_tkinter.TclError: invalid color name`. This is often related to `tkinter` or system-specific display configurations.
- gotcha While MouseInfo states compatibility with Python 2 and 3, Python 2 reached its end-of-life in 2020 and is no longer supported. Running MouseInfo with Python 2 is not recommended due to security vulnerabilities and lack of maintenance in the Python 2 ecosystem.
Install
-
pip install mouseinfo
Imports
- MouseInfoWindow
from mouseinfo import MouseInfoWindow
- mouseinfo (module)
import mouseinfo
Quickstart
import mouseinfo # To run the MouseInfo GUI application programmatically: # This will open a GUI window that displays mouse coordinates and pixel color. # The application is blocking until the window is closed. mouseinfo.MouseInfoWindow() # Alternatively, you can run it from the command line: # python3 -m mouseinfo