Skip to main content

VlaamsCodex / Platskript — parody language transpiled to Python

Project description

VlaamsCodex / Platskript

VlaamsCodex is a tiny parody toolchain for Platskript (.plats) that transpiles to Python.

Quick start

  1. Create a venv and install:
python -m venv .venv
. .venv/bin/activate
python -m pip install -U pip
python -m pip install -e .
  1. Run explicitly via the CLI:
plats run examples/hello.plats
  1. Or use “magic mode” (custom source encoding):
python examples/hello.plats

Contents

  • docs/ — documentation
  • examples/ — example .plats files
  • src/vlaamscodex/ — reference implementation (compiler, codec, CLI)
  • data/vlaamscodex_autoload.pth — startup hook that registers the codec
  • tests/ — pytest tests (unit + subprocess integration)

Start reading here

  1. docs/01_overview.md
  2. docs/02_how_python_runs_it.md
  3. docs/03_packaging_and_install.md

Quick mental model

  1. A .plats file begins with a Python encoding declaration:
# coding: vlaamsplats
  1. A .pth hook in site-packages runs at startup and registers a codec named vlaamsplats.
  2. When python myscript.plats starts, Python sees the encoding declaration and uses your codec to decode the file.
  3. Your codec’s decode() function turns Platskript text into Python text.
  4. Python executes the produced Python text.

Notes

  • Limitations: python -S and python -I can break magic mode because site / .pth hooks won’t run.
  • Fallback: plats run script.plats always works (no startup hooks required).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vlaamscodex-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vlaamscodex-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file vlaamscodex-0.1.0.tar.gz.

File metadata

  • Download URL: vlaamscodex-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vlaamscodex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 654de5e4068d0b6575b763d35796c51b39042121b763164b2770bda9a37be010
MD5 fdf8329254798bd8c1bfd056b3d30af1
BLAKE2b-256 681c2bbcaf74389168dcf1522957a36742f955f8c777dfdd8316db18bc5fe248

See more details on using hashes here.

File details

Details for the file vlaamscodex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vlaamscodex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vlaamscodex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2cbf70444715b4c98bc40ab37a32243028719fd196588df99410329d650646eb
MD5 175c90fd7d855872375d7cac5f93529b
BLAKE2b-256 1edeacf94c3c9626c30520fd824820260c8744c8618df0315e46931b23daab2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page