screeninfo
Fetch location and size of physical screens.
Supported environments
- MS Windows
- MS Windows: Cygwin
- GNU/Linux: X11 (through Xinerama)
- GNU/Linux: DRM (experimental)
- OSX: (through AppKit)
I don't plan on testing OSX or other environments myself. For this reason, I strongly encourage pull requests.
Installation
pip install screeninfo
If you install it from sources:
python3 setup.py install
Usage
from screeninfo import get_monitors
for m in get_monitors():
print(str(m))
Output:
Monitor(x=3840, y=0, width=3840, height=2160, width_mm=1420, height_mm=800, name='HDMI-0', is_primary=False)
Monitor(x=0, y=0, width=3840, height=2160, width_mm=708, height_mm=399, name='DP-0', is_primary=True)
Forcing environment
In some cases (emulating X server on Cygwin etc.) you might want to specify the
driver directly. You can do so by passing extra parameter to get_monitors()
like this:
from screeninfo import get_monitors, Enumerator
for m in get_monitors(Enumerator.OSX):
print(str(m))
Available drivers: windows, cygwin, x11, osx.
Metadata
Release files for screeninfo 0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| screeninfo-0.7.tar.gz | 10.6 kB | Details |
Release files / screeninfo-0.7.tar.gz
| Download URL | screeninfo-0.7.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12a97c3527e3544ac5dbd7c1204283e2653d655cbd15844c990a83b1b13ef500
|
|
BLAKE2b-256 checksum How to use checksums |
7adc9015386eb0b75c500d540a4481863cb176abf7f852e4ddaf6484d323b145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
|