PYTHON
Haxe requires Python 3.x The latest as of now (Feb 22, 2019) is Python 3.7.2
Because of Security fixes and new Python features Python 3.6 or later is recommended.
Take a little time to read the page as there may be some errata for your OS or for problems if you also want to embed the Python interpreter within your application.
Using Python on Windows Tips
I install on Windows and install Python 64 bit for all Users.
Python install does not change any Registry values.
Python install adds the installed Python directory to the Path environment variable.
If you need to Uninstall on Windows
delete the directory where Python was installed such as:
C:\Program Files\Python37
To Uninstall you also need to edit the Path setting and remove the reference to the Python37 directory.
After install open Cmd.exe window (or your favorite shell) and type
python
you should see something like:
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
The >>> prompt is from the Python interpreter and shows it is ready for you to type in commands or run a .py program (typically called a Python script).
Install Haxe. Python support is already part of Haxe.
Using Haxe to compile to Python
Haxe puts all of your Haxe sources and also sources for any Haxe libraries
into a single Python .py file.
haxe -lib haxe-strings -cp src -python C:/Programming/Haxe/My_Project/Python_OUT/main.py -main Main
Important Note:
Please notice that a Python_OUT directory is used to hold the main.py file.
If you use Haxe to build to multiple languages such as Python, JavaScript and so on:
Having Haxe output each language in a separate directory allows for easier management.
Running Python Programs
If you used a separate directory, the below will work.
cd Python_OUT
python main.py
Debugging Python Programs
IDLE Debugger is included with Python (UI is more of a Text than Graphical window appearance)
PyScripter on Windows is a full IDE that works nicely with a more modern GUI.
Visual Studio 2017 Community Edition
Visual Studio Code
Eclipse (not sure how up to date the Python plugin is)