A Punchcard generation package
Project description
PyPunch
Python Punch Card Maker
Overview
This package creates a simple graphical representation of an old IBM 029 keypunch puchcard.
By default, saves the punch card to out_card.png. This can be changed by specifying a different
filepath (see below). It uses Pillow internally, so most image types are supported, depending on
filename extension.
Usage
The following methods are available:
PyPunch.build_card(command: str = "Example Command", out_file="out_card.png"):
This is the main function of this module. Optionally takes a command and a filename, then generates
a punch card with this command, and saves it at out_file.
NOTE: THIS IS NOT A COMPILER! The output of this module is just an encoded string. Compilation is much more complex, and requires knowledge of the whole program and system architecture, and is therefore left as an exercise for the reader.
PyPunch.mappings:
This is a dict consisting of valid characters mapped to a list of the positions that need to be punched
out of the card. For example, 'I': (0, 11) indicates that punching I requires a punch in positions 0
and 11.
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 Distribution
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 PyPunch-1.0.0.tar.gz.
File metadata
- Download URL: PyPunch-1.0.0.tar.gz
- Upload date:
- Size: 121.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae2cae303220fd620172fa48a01760a4da9005243bf21e6175bb45064ed3e1c7
|
|
| MD5 |
6ecd7eafe3a465f1a0092b75cb2d41b1
|
|
| BLAKE2b-256 |
18a676380f1cdcab38ec470f0a136f33e1964a877398c6e0d0c9f5e09a2b11c8
|
File details
Details for the file PyPunch-1.0.0-py3-none-any.whl.
File metadata
- Download URL: PyPunch-1.0.0-py3-none-any.whl
- Upload date:
- Size: 121.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d93dda94a8d9d7bdc6b13d31b9dc559ce005182305a1a4ebbc1fbab3f2ae93d
|
|
| MD5 |
6e2ed9d83e67e0f9becc18674f18353b
|
|
| BLAKE2b-256 |
f713f4833cb8be4f8ed30e004d02d8d8c3f5821ee1681148a622f9dadfa1c619
|