New to Python - Compiled Language?
KefX
keflimarcusx at aol.comNOSPAM
Mon Nov 3 23:36:37 EST 2003
>The impression I get from www.python.org is that it is a compiled
>very high level language, which is extendable via C++. I'm a C++
>programmer and the tools and utilities referred to existing in Python
>would increase the development time of my projects. However, what I'm
>creating are programs, not just scripts.
>
>Is Python a language which can be compiled into an executable program?
Well, Python isn't a compiled language in the sense of native code compilation
(that is, making an EXE on Win32, or a normal binary executable on Unix, etc.),
though there is a tool called py2exe that you may want to look into in order to
bundle your program into an executable on Win32.
(http://starship.python.net/crew/theller/py2exe/)
However, despite being an "interpreted" language, it's certainly a usable - I
daresay great - language for large applications (or even things such as video
games!) as well as scripts. If you ever need a performance boost, you can use
psyco (http://psyco.sourceforge.net/), and if that doesn't do the trick, you
can profile your code to find out what needs to be rewritten in C or C++.
Note that it's much easier to write your main code in Python and extend it with
C++, rather than embedding Python in C++ (the same goes for C, of course).
The best advice I can give is just give it a shot. Write something small but
nontrivial and see how it works for you. Any more questions?
- Kef
More information about the Python-list
mailing list