Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

dtcooper/python-dispmanx

Repository files navigation

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!

AltStyle によって変換されたページ (->オリジナル) /