Why not a Python compiler?

cokofreedom at gmail.com cokofreedom at gmail.com
Tue Feb 5 09:30:18 CET 2008

On Feb 5, 9:19 am, Santiago  Romero <srom... at gmail.com> wrote:
>  ( Surely if this question has been asked for a zillion of times... )
>  ( and sorry for my english! )
>  I'm impressed with python. I'm very happy with the language and I
> find Python+Pygame a very powerful and productive way of writing 2D
> games. I'm not, at this moment, worried about execution speed of the
> small game I'm working on (it runs at full 60 fps even in an old AMD-
> K6 450 Laptop computer), but I continue asking me the same question:
>  Why not a Python COMPILER?
>  It would be very nice to be able to output Linux, MAC or Windows
> binaries of compiled (not bytecompiled) code. It would run faster, it
> will be smaller in size (I think) and it will be easy to distribute to
> people not having python installed. Yes, I know about py2exe, but I'm
> not sure if that's the right aproach.
>  So, what's wrong with compiling python?
>  Maybe is not possible due to nature of the language? Is just a
> decision?
>  What do you think about this?

I don't know the exact details but I think the issue is the dynamic
nature of Python makes it impossible to correctly store the various
types and changes into compiled code. Someone else will probably be
able to provide a good reason as to why it isn't very feasible, nor a
good idea. If you want to speed up your python look at Psyco.

More information about the Python-list mailing list