Skip to main content

MyanCode · မြန်မာကုဒ် (Python Edition)

A Burmese natural language programming language for beginners — rewritten in Python. Write code in Myanmar script — MyanCode understands it, transpiles it to Python, and runs it.

This is a Python port of the original MyanCode JavaScript implementation.


What is MyanCode?

MyanCode is a multi-paradigm programming language written entirely in the Burmese (Myanmar) language. Students write code like this:

score ကို ၇၅ အဖြစ်သတ်မှတ်ပါ
အကယ်၍ score က ၈၀ ထက်ကြီးရင်
  ပြောပါ "ဂုဏ်ထူး"
မဟုတ်ရင်
  ပြောပါ "ပျမ်းမျှ"
ပြီးပါပြီ

Which runs as:

ပျမ်းမျှ

How It Works

MyanCode uses a 6-stage NLP pipeline:

[Burmese source .myan]
        ↓
[1] Tokenizer       — splits text into typed tokens (lexical analysis)
        ↓
[2] Classifier      — identifies the intent of each line (text classification)
        ↓
[3] Extractor       — pulls out variable names, values, operators (NER)
        ↓
[4] AST Builder     — assembles lines into a nested syntax tree (syntactic parsing)
        ↓
[5] Transpiler      — converts the tree to Python (language generation)
        ↓
[6] Runtime         — executes via Python subprocess, captures output

Installation

Requires Python 3.10+.

cd myancode-python
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# or: pip install -e ".[dev]"

Usage

Run a .myan file

python src/cli.py examples/hello.myan
# or after pip install -e .
myancode examples/hello.myan

CLI options

myancode --transpile examples/hello.myan   # print generated Python
myancode --ast examples/hello.myan         # print AST JSON
myancode --repl                            # interactive REPL
myancode --ide                             # browser IDE
myancode --version

Browser IDE

Recommended (avoids conflict with the Node.js myancode on your PATH):

./myancode --ide              # from project root — always Python
# or
source scripts/activate.sh    # venv + fixes PATH vs nvm
myancode --ide
# or
.venv/bin/myancode --ide
myancode-py --ide             # after pip install -e .

Open http://127.0.0.1:3000. Tabs: OUTPUT, SIMULATION (n8n-style: packets flow through a shared NLP pipeline), PYTHON.

Node vs Python myancode

If you have the old Node.js MyanCode installed (npm install -g myancode), the global myancode command opens https://myan-code.vercel.app (JavaScript IDE). The Python edition uses a local server instead.

Command What runs
myancode --ide (global) Often Node → Vercel if nvm is on PATH
./myancode --ide Python → localhost
.venv/bin/myancode --ide Python → localhost
myancode-py --ide Python → localhost (no name clash)

To remove the conflict entirely:

npm uninstall -g myancode
pip install -e .
source scripts/activate.sh
myancode --version   # should print 2.2.0

Docs


Project Structure

myancode-python/
├── bin/myancode
├── config/                  # keywords + error messages (dev)
├── docs/                    # tutorial + language reference
├── examples/                # sample .myan programs
├── src/
│   ├── cli.py
│   ├── engine/              # tokenizer → runner pipeline
│   │   └── data/            # packaged copy of config JSON
│   └── ide/                 # Flask IDE + public/index.html
└── tests/                   # pytest suite

Tests

source .venv/bin/activate
pytest -q

License

MIT

Download files

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

Source Distribution

myancode_python-2.2.0.tar.gz (46.5 kB view details)

Uploaded Source

Built Distribution

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

myancode_python-2.2.0-py3-none-any.whl (48.0 kB view details)

Uploaded Python 3

File details

Details for the file myancode_python-2.2.0.tar.gz.

File metadata

  • Download URL: myancode_python-2.2.0.tar.gz
  • Upload date:
  • Size: 46.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for myancode_python-2.2.0.tar.gz
Algorithm Hash digest
SHA256 48b01ff4c2202257f9297cb2992cfaaa9e061cb305cae6d23e386e74df2fc08a
MD5 c4c3d0b39f3c5226473f6094869b50d9
BLAKE2b-256 ada9f84472b3fc89caf33454aabbe86ddbc442d49107ab0d21df2292d41e563f

See more details on using hashes here.

File details

Details for the file myancode_python-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for myancode_python-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29732acb1038f50cae24fee2704f0059e6138f4b4bc200fb4a5f5638b87f537d
MD5 c0eaf7729feefdb92276f2b64afe0c2e
BLAKE2b-256 0fd429336c3d8d8d769659c79b921c941bb67bc1580d14bb06da120014434278

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.0

2 files

2.2.1

2 files

This release

2.2.0 This release

2 files

2.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page