Code Page 437 memory-mapped graphics codec
Project description
CP437 Graphics Codec
Python text codec for Code Page 437 memory-mapped graphics data, which replaces the control codes with icons and symbol glyphs. Works as a drop-in replacement for the builtin 'cp437' codec.
Includes a subset of CP437 used in the Minecraft Classic network protocol.
[!IMPORTANT] This work is not affiliated with Microsoft Corporation, Mojang AB, Minecraft, ClassiCube, International Business Machines Corporation, or Unicode, Inc.
Included Codecs
| Codec | Aliases | Description |
|---|---|---|
| cp437g | 437g, ibm437g, classicube | All 255 code points |
| minecraft | Only the first 127 code points |
Installation
To install from the Python Package Index:
$ python3 -m pip install cp437g
To install from this repository, use the PyPI build module:
$ python3 -m pip install build
$ python3 -m build
$ python3 -m pip install dist/*.whl
Examples
To encode a string:
>>> import cp437g
>>> "••••".encode('cp437g')
b'\x07\x07\x07\x07'
To decode a string:
>>> import cp437g
>>> b'\x0D\x20\x4C\x61\x20\x4C\x61\x20\x0D'.decode('cp437g')
'♪ La La ♪'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cp437g-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cp437g-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18099f67a58112666bcd37e63ed1fc34bcdb3236c6c849868eeabe40e3efdf48
|
|
| MD5 |
202c6b8370d3ba80a36a90396a97a1e1
|
|
| BLAKE2b-256 |
017baded5d5cf3a27d091f548f51672ae95cb612c6db9208ded1e688c7cf5337
|