gython

command module
v0.0.0-...-11fbe7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2016 License: BSD-2-Clause Imports: 6 Imported by: 0

README

Gython

Overview

Gython is a simplified python virtual machine implemented in Go. It reads a source file compiled in a special bytecode format named CoCo which is easier to be parsed than .pyc format. The compiler is example/disassembler.py.

Gython implement a subset of Python 3 bytecodes(not compatible with Python 2).the feature supported now are below:

  • basic data structures: int/float/string/list/tuple/function
  • control flow statements: for/while/if
  • closure

I wrote this just for understanding python internel and practicing Go, so it will never be completely compatible with CPython.

TODO:

  • Read .pyc file directly
  • Exception
  • iterator
  • class
  • module

License

BSD 2-Clause

Reference

  • GoPy Another python virtual machine implemented in Go. My implementation is more similar to CPython than it.

  • CoCo A C++ implementation of python virtual machine. The CoCo bytecode format is defined by it.

Documentation

Overview

gython project main.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL