[Tutor] Has anyone ever tried to convert the textual output of the dis module to another language

Sean Perry shaleh at speakeasy.net
Mon Apr 18 04:19:17 CEST 2005


R. Alan Monroe wrote:
> The main things about it that would make it appealing to me:
> 
> #1 - MUCH MUCH MUCH smaller exes. Speed is not an issue to me, but
> filesize is. Have you ever compiled "Hello world" in a new language,
> and found that the exe was 100K+, when it really only needs to be less
> than 1K? And py2exe... I am not averse to using it, but 800 - 1000K+
> exes, well, it's just my pet peeve.
> 
> #2 - Love of classic hacking wizardry. :^)
> 

The problem is Python is a dynamic language so you HAVE to ship a 
runtime with it. That hello world bin may be small, but you will still 
have the Python runtime (at least a meg or so). Consider also module 
imports. Do they get compiled into the program? Shipped as a dynamic 
linked library?

Personally, it sounds like a nifty learning project. Realistically that 
seems to be the only benefit.


More information about the Tutor mailing list