can only Lua compile code that is less than 200K? No! Python can also.

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.