GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - frabbit/hx2python: Experimental Python Target for Haxe. By now Haxe supports python by default.

BranchesTags
Open more actions menu

Latest commit

 

History

136 Commits
136 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
demo
demo
 
 
haxe @ f6db5dc
haxe @ f6db5dc
 
 
src/python
src/python
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
README.md
README.md
 
 
build.hxml
build.hxml
 
 
rundemo.sh
rundemo.sh
 
 
runtests.sh
runtests.sh
 
 
unit.py
unit.py
 
 

Repository files navigation

Important

This project is obsolete since the python target was integrated into the haxe compiler: use https://github.com/HaxeFoundation/haxe instead!

hx2python

A proof of concept python target for haxe.

First of all thank to Andrew Vernon who created the dart target for haxe using the same technique as i'm using now for the python target.

Quick Start Guide

  1. Download and install python (currently only python 3 is supported).
  2. Make sure the python3 executable is in your path environment variable.
  3. compile and run demo : haxe build.hxml

As long as everything worked there should be a file named "hxpython.py" in the bin folder with output from the file traced to the terminal. Please note this is a very early proof of concept that has not been tested widely so may not work on all environments at this stage.

More Info

Folder Structure

src/

-contains files required for python generation along with standard haxe classes. Contents of this file intended to end up in "std" folder of haxe install.

src/haxe/macro/

Contains macro classes required for Custom JS Generation.

src/python/_std/

Contains versions of haxe standard files required for python target

src/python/lib/

Contains externs and type definitions for the python std lib.

demo/

Contains the demo application code.

bin/

Where the generated python file will be once the project is compiled.

Why does the generated python code look weird?

This is just a proof of concept and at the moment the only thing I'm really concerned with is getting python code generated in haxe to run by the python interpreter.

Why is there only one .py file?

Python has a slightly different system for handling importing code from different modules or libraries while avoiding namespace clashes. The current implementation which joins the parts of a path using "_" ensures there are no namespace classes for Classes, Enums or Interfaces of the same name without having to worry about importing from multiple modules.

About

Experimental Python Target for Haxe. By now Haxe supports python by default.

Resources

Readme
Activity

Stars

35 stars

Watchers

8 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.