Skip to content

Files

Latest commit

05c5c37 · Feb 22, 2025

History

History
59 lines (37 loc) · 1.85 KB

README.md

File metadata and controls

59 lines (37 loc) · 1.85 KB

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.