I know, It's a very trivial question, but I haven't found any example, so I am stucked now.
I have a very simple Haxe object. This is the content of the file Thing.hx
:
@Persistent
class Thing {
@Property
public var thingName: String;
}
I can compile it:
haxe Thing.hx -python Thing.py
The result is some magic, the content of Thing.py
is:
class Thing:
pass
Thing.__meta__ = _hx_AnonObject({'obj': _hx_AnonObject({'Persistent': None}), 'fields': _hx_AnonObject({'thingName': _hx_AnonObject({'Property': None})})})
My DoTheThing.py
Python program wants to use this:
import Thing
But it fails right on the import
statement:
NameError: name '_hx_AnonObject' is not defined
Also, in my real project, I have a more complex Haxe class, which, when I include it from Python, occurs this error:
AttributeError: type object 'python_Boot' has no attribute 'keywords'
What Python modules should they include? How can I figure out, what modules should I include for my Haxe classes?