DispmanX Bindings for Python
Documentation | Python Package Index
Usage
Install with pip,
pip install dispmanx
Then try out this sample program using pygame,
from random import randint
import pygame
from dispmanx import DispmanX
def random_color_with_alpha():
return tuple(randint(0, 0xFF) for _ in range(3)) + (randint(0x44, 0xFF),)
display = DispmanX(pixel_format="RGBA")
surface = pygame.image.frombuffer(display.buffer, display.size, display.pixel_format)
clock = pygame.time.Clock()
for _ in range(20):
surface.fill(random_color_with_alpha())
display.update()
clock.tick(2)
Next stop: the project's documentation.
License
This project is licensed under the MIT License — see the LICENSE file for details.
Final Note
...and remember kids, have fun!
Metadata
Release files for dispmanx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dispmanx-0.1.0.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dispmanx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / dispmanx-0.1.0.tar.gz
| Download URL | dispmanx-0.1.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c606e326e303ba718eac93c7c9f7669c516147fa94f3ee989f02a48542392a3
|
|
BLAKE2b-256 checksum How to use checksums |
c831d4c30a00226ccb8098af28896601f7d29cd320655bff6239bcd69f181da2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.9.13 Linux/5.15.0-1014-azure
|
Release files / dispmanx-0.1.0-py3-none-any.whl
| Download URL | dispmanx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5394c3584ed9c46e64bd4430e4e4909646acbfc1bae5d45c7abc3372af270e7b
|
|
BLAKE2b-256 checksum How to use checksums |
ef127b4d860e927f40e91d0c5224a90c6a4b68baad9848a26fffe3eda6d3e781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.14 CPython/3.9.13 Linux/5.15.0-1014-azure
|