HaxeFoundation/haxe — pull request #2924 by Simn (2014-04-27 17:24:19+00:00)
Title: Python support

This pull request adds the `-python ` command, allowing compilation of Haxe programs to python 3.

The implementation passes the Haxe unit tests as well as several other projects we tested.

Modification to the Haxe core are minimal:

- common.ml: add Python as a target along with its configuration
- main.ml: add the `-python` command and handle Python as a target where required
- Makefile: add genpy module
- the rest of the implementation is in the file genpy.ml

Standard library files are modified where required, mostly by adding `#if python` sections with implementations. Additions include various files under `std/python` with the following structure:

- std/python: Various types which can be freely used by users.
- std/python/internal: Special Haxe runtime types to help with Haxe conformance.
- std/python/io: IO helper which are used by the Haxe IO API.
- std/python/lib: Externs for the python standard library.

Missing are some implementations in sys.net and everything in sys.db. We will add that a bit later.