Python now gives the feeling is big, the thing is many, after installs in the Windows unexpectedly to occupy 100 megabytes of space. Lua feels very small and light. Python 2.7 Code compiled under Linux also has more than 3M after strip, earlier versions should be smaller, but there should be seven hundred or eight hundred trillion. So does python not compile a lightweight, small-sized code? The answer is no, here are a few Python variants to see how small python can be.
1, Pymite
This is a python that can run on a 8-bit microcontroller, didn't think of it! MCU on the ROM is often less than 100kb,ram less than 8KB, if compared to the PC, really can say is the difference between giants and ants Ah, Python incredibly can run on it, is not very subversive of your thoughts? Now Pymite can run on the Arduino mega, Arduino is a famous open source hardware platform, mainly using AVR 8-bit microcontroller, pymite on the above to run only 64KB of ROM,4KB RAM, in more detail, see the following link:
Http://playground.arduino.cc/CommonTopics/PyMite
The path to the source code is as follows:
https://code.google.com/p/python-on-a-chip/
2, Tinypy
This is a claim can be compiled less than 64K Python project, of course, the actual compilation of the size of 200K or so, the document has written, in the use of optimized method can be compiled <64k program, but I did not try. But the 200K is already very small. What's even more incredible is that it actually integrates pygame. See the official website:
http://www.tinypy.org/
It looks like it hasn't been updated for a long time.
However, since the compiled code is small, the function of course is not so powerful, this is a fish and bear paw problem.
Or that sentence, the rule is used to break, the idea is used to subvert. This is more so in the IT industry.
can only Lua compile code that is less than 200K? No! Python can also.