Flython?

Peter Hansen peter at engcorp.com
Thu Aug 12 23:08:29 EDT 2004


Christopher T King wrote:

> On Thu, 12 Aug 2004, Peter Hansen wrote:
> 
> 
>>In the vein of Jython, I wonder what it would take to build
>>a Flython?  (Lousy name, I know.)  That would take Python
>>source, presumably a subset since some things couldn't be supported,
>>and compile it into ActionScript bytecode (aka the bytecode compiled
>>from ECMAScript source for the Macromedia Flash player environment).
> 
> I don't know much about ActionScript bytecode, but I think a general
> Python -> ECMAScript translator wouldn't be too hard (presuming a Python
> subset is acceptable).  ECMAScript variables are untyped, so that should
> ease translation some.  Sounds like my weekend project!

Well, it's not the source code that I care about, it's the
object code (as in, the Flash bytecode).  The only ECMAScript
to Flash bytecode compilers of which I'm aware are
commercial and expensive, and come with big useless (to me)
GUI/animation/freaky special effect generation systems...

There are advantages in Python direct to Flash bytecode with
a simple command line compiler (particularly if one uses
test-driven development...).

This may be where I have to dig into an area that's outside
my expertise, namely the compiler.py module, parse trees,
and code generation...

-Peter



More information about the Python-list mailing list