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.1.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.1.0.tar.gz (42.3 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.1.0-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: myancode_python-2.1.0.tar.gz
  • Upload date:
  • Size: 42.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 e7f07eb1e9bb893084315caa2101c5be1e1c339501d554fd479a124b8a6701d6
MD5 41e065aae7c6d69d7a5fda66ceb8f509
BLAKE2b-256 cfe0f6be05b3d4575a91614c5d082a568d0912d5ead4ae6c97979ecf60826c66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for myancode_python-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ee0828e39f703ec4b7fe3a5e53b1f40de420620ad1826e532ee5b31aab279bb
MD5 7280ef76ada3c5123bcd305bd3c3dae9
BLAKE2b-256 c885e7e6d068ebe1c9b7763850ed048216f569432648df5897bd769f36092132

See more details on using hashes here.

Release history Release notifications | RSS feed

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

This release

2.1.0 This release

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