Skip to content

bendmorris/pyhx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

pyhx is a simple import hook for importing Haxe directly into Python! Once installed, you can directly import Haxe source files in your Python code. If the Haxe file has been modified more recently than its compiled Python version, it will be recompiled.

Setup

To install pyhx, run python setup.py install.

Using pyhx requires Haxe to be installed. It will work out of the box if the haxe binary is on your executable path; otherwise, pass the path to haxe as an argument to pyhx.install().

Usage

PyHxTest.hx

class PyHxTest {
    public static function main() {
        trace("HELLO FROM HAXE!");
    }
}

test.py

import pyhx
pyhx.install()

from PyHxTest import PyHxTest
PyHxTest.main()

About

Python import hook for Haxe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages