Registry / devops / pywinbox

pywinbox

JSON →
library0.7pypypi✓ verified 86d ago

Cross-platform and multi-monitor toolkit to handle rectangular areas and window boxes. Current version 0.7 provides support for Windows, Linux (X11, not Wayland), and macOS. Development is active but releases are irregular.

pip install pywinbox
INSTALL
IMPORT
SIG · PYWINBOX
P
pywinbox
devopspythonv0.7
Install
1.9s 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.7 · 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.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

PyWinBox
from pywinbox import PyWinBox
Main class for cross-platform window/area handling.

Create a PyWinBox instance and retrieve a window by title, then print its bounding box.

from pywinbox import PyWinBox # Create a PyWinBox instance box = PyWinBox() # Get the window of a running application (e.g., notepad on Windows, gnome-terminal on Linux) # Replace 'notepad' with the actual window title # For Linux, the title may not match exactly; use 'gnome-terminal' as an example try: window = box.getWindow(title='notepad') print(f"Window found: {window}") print(f"Bounding box: {box.getBox(title='notepad')}") except Exception as e: print(f"Error: {e}")
Debug
Known issues
gotchaOn Linux, PyWinBox relies on X11 and may not work under Wayland. Ensure you are running in an X11 session.
fix
Run your application under X11 (e.g., set environment variable XDG_SESSION_TYPE=x11 or switch display manager).
affects: all
gotchaWindow titles are case-sensitive and must match exactly on Windows. On Linux, the title may not be the full window title seen by the user.
fix
Use tools like 'xdotool' or 'wmctrl' on Linux to inspect exact window titles. On Windows, use Spy++ or similar.
affects: all
deprecatedThe old import path 'from pywinbox import *' or 'import pywinbox' directly may expose internal/private elements. Use explicit imports as shown in the documentation.
fix
Import specific symbols: from pywinbox import PyWinBox
affects: >=0.4
Errors
Common errors & fixes
AttributeError: module 'pywinbox' has no attribute 'PyWinBox'
Incorrect import path (e.g., import pywinbox) or older version that uses different class name.
fix
Use: from pywinbox import PyWinBox
pywinbox.exceptions.WindowNotFoundError: Window with title '...' not found
Window title is misspelled, case mismatch, or window does not exist.
fix
Verify the exact window title (case-sensitive) and ensure the window is open.
Upgrade
Version history
0.7latest on PyPI · released Apr 17, 2024
Audit
Dependencies
typing_extensionsrequiredRequired at runtime for type hints (since v0.6).
Agent activity
8 hits · last 30 days
node
8
Resources
pywinbox — pip install pywinbox · libregistry