site  contact  subhomenews

Tiny-Python

November 11, 2008 — BarryK
tinypy
I reported recently the problem of Wirbel generating huge executables, so I looked around at what other Python compilers/interpreters are out there. Specifically, what I'm looking for is small size. An interpreter is still within my acceptable range, as they compile to bytecode first -- in fact, I think that the "full" Python has an option to generate a bytecode file. Bytecode is kind of half-way between a pure source-code-interpreter and a native-code-compiler.

Anyway, the first one that I have tested is 'tinypy'. It took a lot of messing around, but I managed to compile it statically in the uClibc rootfs -- the interpreter executable is just 131KB! -- that is static, totally standalone, so can reside in the initial ramdisk and will work in any Linux distro and all old versions of Puppy.

Homepage: http://tinypy.org/

I have packaged it up as 'tinypy-1.1-static.pet':
http://murga-linux.com/puppy/viewtopic.php?t=35446

So far I have only tested "hello world" -- like Wirbel, 'print' is a function, so you need brackets:
print("hello world")
The main problem with testing it is the lack of documentation -- I will have to study the source code to find out what functions etc. are available.

pymite
This is another one, but I can't compile it.

Shed-Skin
This is another Python compiler, like Wirbel, that generates intermediate C++ code. I'm going to test that next.

Comments

what a beautifull life :)



Tags: woof