Skip to content

Vortex2Oblivion/hxpy

Repository files navigation

hxpy

CI

Haxe/hxcpp @:native bindings for the Python C API

This library works on the C++ target only!

Installation

via haxelib

haxelib install hxpy

via git for the latest updates

haxelib git hxpy https://github.com/Vortex2Oblivion/hxpy.git

Usage

See the demos folder for more usage examples

A simple example

package;

import hxpy.PyRun;
import hxpy.Py;

class Main {
	static function main() {
		Py.initialize(); // Initializes the Python interpreter.
		PyRun.simpleString("print(\"Hello World!\")"); // Runs print("Hello World").
		Py.finalizeEx(); // Closes the Python interpreter.
	}
}

Licensing

hxpy is made available under the MIT License. Check LICENSE for more information.

Python is made available under various licenses. Check The Python Github or python.org for more information.

Haxe is made available under various licenses. Check The Haxe Github for more information.