Registry / testing / mouseinfo

mouseinfo

JSON →
library0.1.3pypypi✓ verified 24d ago

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.

pip install mouseinfo
INSTALL
IMPORT
SIG · MOUSEINFO
M
mouseinfo
testingpythonv0.1.3
Install
3.2s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.2s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MouseInfoWindow
from mouseinfo import MouseInfoWindow
Used to launch the MouseInfo GUI application programmatically.
mouseinfo (module)
import mouseinfo
The module itself can be imported to access its functions, or the application can be run directly via `python -m mouseinfo`.

This quickstart demonstrates how to launch the MouseInfo GUI application using Python. The application provides a live display of the mouse cursor's XY coordinates and the RGB color value of the pixel underneath. It will block the Python shell until the GUI window is closed. For a non-blocking experience or direct coordinate/color retrieval in scripts, users typically integrate with `PyAutoGUI`'s `position()` and `pixel()` functions, which `MouseInfo` is often used to plan for.

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
mouseinfo --version
Debug
Known issues
gotchaMouseInfo 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.
fix
Use a separate process or thread if you need to run MouseInfo concurrently with other Python code. Alternatively, run it directly from the command line (`python3 -m mouseinfo`) for interactive use without blocking your script.
affects: All versions
gotchaUsers 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.
fix
Ensure `Pillow` (PIL) is correctly installed (`pip install Pillow`). System-specific workarounds or ensuring correct display permissions might be necessary. Some users report issues persist even with `Pillow` installed.
affects: All versions on macOS
gotchaWhile 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.
fix
Always use MouseInfo with Python 3.x for stability, security, and access to modern Python features.
affects: All versions used with Python 2.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'mouseinfo'
The `mouseinfo` package is not installed in the Python environment being used, or the Python interpreter cannot find it in its `sys.path`.
fix
Ensure `mouseinfo` is installed in the correct environment by running `pip install mouseinfo`. On macOS/Linux, use `pip3 install mouseinfo`. If multiple Python versions are present, use `python3 -m pip install mouseinfo` or `py -m pip install mouseinfo` on Windows to target a specific interpreter.
KeyError: 'DISPLAY'
This error occurs when `mouseinfo` (often imported via `pyautogui`) attempts to access the X server's DISPLAY environment variable, which is typically absent in environments without a graphical display, such as Windows Subsystem for Linux (WSL) without an X server, or headless servers.
fix
Run your script in a graphical environment on Windows, macOS, or a Linux desktop with an X server. If using WSL, ensure an X server (like VcXsrv or X410) is installed and configured on Windows, and the `DISPLAY` environment variable is set correctly in your WSL terminal. Alternatively, avoid using `mouseinfo` functions in headless environments if GUI interaction is not required.
ModuleNotFoundError: No module named 'tkinter'
`mouseinfo` relies on `tkinter` for its graphical user interface, and this error indicates that the `tkinter` module is not installed or not available for your Python installation, commonly on Linux systems.
fix
On Debian/Ubuntu-based Linux systems, install `tkinter` by running `sudo apt-get install python3-tk` (for Python 3). On Arch Linux, use `sudo pacman -S tk`. Other distributions will have similar package names for `tkinter` or `python-tk`.
python: command not found
This is a shell error, not a Python error, indicating that the `python` or `pip` command is not recognized or not in the system's PATH. This often happens when trying to install or run Python packages without the correct setup.
fix
Ensure Python and pip are correctly installed and added to your system's PATH. On most systems, `python3` and `pip3` are the standard commands for Python 3. You can also explicitly call pip using `python3 -m pip install mouseinfo` or `py -m pip install mouseinfo` on Windows.
Upgrade
Version history
0.1.3latest on PyPI · released Mar 27, 2020
Audit
Dependencies
PillowrequiredRequired for capturing pixel color information.
pyperclipoptionalUsed for clipboard functionality within the application.
python-xliboptionalRequired for X11 compatibility on Linux systems.
Agent activity
3 hits · last 30 days
node
2
Resources
mouseinfo — pip install mouseinfo · libregistry