By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,763 Members | 1,616 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,763 IT Pros & Developers. It's quick & easy.

Python compiler -> py to C, py to ELF

P: n/a
Hello !

Know anyone about py2C compiler ?
I see that py2jar is exists, and is named jython.

But have a python a compiler what can compile the complete project
into one ELF binary file ?

Thanx for infos.

--
Best regards,
fowlertrainer mailto:fo***********@anonym.hu
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
fo***********@anonym.hu wrote:
Hello !

Know anyone about py2C compiler ?
I see that py2jar is exists, and is named jython.

But have a python a compiler what can compile the complete project
into one ELF binary file ?

Thanx for infos.


Yes, type 'py2c' into google... You will have a C code but this will be
as fast as trough the python interpreter.

In fact, nothing real with compiler can be done until type inference in
Python is fully implemented.

For type inference look at StarKiller
(http://www.python.org/pycon/dc2004/papers/1/), a promising type
inference for Python. I think the author is also working on a c++
translator but no code is released.

If you just want an exe file, also see py2exe
(http://starship.python.net/crew/theller/py2exe/)

If what you want is something faster than python but not an ELF file
then also look at pyrex.

Yermat

Jul 18 '05 #2

P: n/a
Yermat wrote:
If you just want an exe file, also see py2exe
(http://starship.python.net/crew/theller/py2exe/)

If what you want is something faster than python but not an ELF file
then also look at pyrex.


If the goal is fast code dont' forget psyco. It is an extremely
simple to use JIT compiler and can speed up Python scripts
dramatically (scripts that aren't just waiting for system I/O
calls to return). Example: Ackermann's function of the Great Language
Shootout: factor 70.

Mit freundlichen Gruessen,

Peter Maas

--
-------------------------------------------------------------------
Peter Maas, M+R Infosysteme, D-52070 Aachen, Hubert-Wienen-Str. 24
Tel +49-241-93878-0 Fax +49-241-93878-20 eMail pe********@mplusr.de
-------------------------------------------------------------------
Jul 18 '05 #3

P: n/a
Yermat wrote:
fo***********@anonym.hu wrote:
But have a python a compiler what can compile the complete project
into one ELF binary file ?


If you just want an exe file, also see py2exe
(http://starship.python.net/crew/theller/py2exe/)


Unless something changed in Windows that I missed, it doesn't use ELF.

Py2exe, on the other hand, runs only on Windows (as should be evident
from its name). I doubt it answers the OP's question.

Check here for something more useful:
http://wiki.wxpython.org/index.cgi/C...oneExecutables

-Peter
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.