Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thenachobit/pyframebuffer
Console Framebuffer for Python
https://github.com/thenachobit/pyframebuffer
Last synced: 1 day ago
JSON representation
Console Framebuffer for Python
- Host: GitHub
- URL: https://github.com/thenachobit/pyframebuffer
- Owner: TheNachoBIT
- License: mit
- Created: 2023-02-28T14:12:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-28T15:14:08.000Z (almost 2 years ago)
- Last Synced: 2024-11-11T11:48:38.428Z (2 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PyFramebuffer
Console Framebuffer for Python## Get Started
**PyFramebuffer** is only one single .py file, so you can just drag "Framebuffer.py" to your project easily without any installation process!
If you're starting a project with this, you can instantiate a Framebuffer with:
```py
f = Framebuffer()
```and start drawing stuff in a `while` loop:
```py
from Framebuffer import Framebufferf = Framebuffer()
while 1:
# Print 'Hello' in the top left corner of the screen.
f.PrintText(0, 2, "Hello")# Print a character in the middle of the screen.
# Only use "PrintAt()" if you're printing a single character.
f.PrintAt(int(f.width / 2), int(f.height / 2), ',')# Print 'World!' in the bottom right corner of the screen.
f.PrintText(f.width - 1 - (len("World!")), f.height - 2, "World!")f.Draw()
```Easy as that! :D