New to Python - Compiled Language?

Peter Hansen peter at engcorp.com
Tue Nov 4 08:25:48 EST 2003


Relee Squirrel wrote:
> 
> I just found out about Python today and it sounds very interesting,
> but I'm having trouble finding solid information about my main
> question. Is Python a compiled language, or merely a sequence of
> commands fed into a seperate program?

Why is that your main question?  If it's not just curiosity, can
you explain why this issue concerns you?

If you think the world is divided into "compiled" and "not compiled"
languages, you are missing some useful and interesting experience.
You might also be missing some great opportunities if you let that
impact your decision-making in a big way.

> 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.

My company (Kaval Wireless) uses Python to create "programs" which
would have been created in C (if, say, we were insane) but which we
chose to create in Python.  We did this because it is a very high-level
language which allows us to get more work done in less time, with
higher quality results.  It's also easier to do with Python, and much
more fun!  The products range from embedded industrial controllers
through automated testing systems right up to Intranet servers.  Oh
yeah, we also write "scripts" using Python, when necessary (to use
the meaning I suspect you assign to that term).

> Is Python a language which can be compiled into an executable program?

Definitely.  We do it frequently.  The fact that it is not done in the
traditional (and rapidly becoming obsolete) way that, say, C++ is
handled is not important to us.

As a C++ programmer, I suspect you consider Java a "real" language,
and not a scripting language.  You've surely seen the market for
programmers using Java grow and in some cases impact on the market
for C++ programmers.  Just so you know, Python is a compiled language
in much the way Java is -- specifically the code compiles to byte code
(like "machine code") for a "virtual machine".  Other than the fact that
CPUs that natively execute Python byte code don't actually exist
(though they now do for Java, of course), there's not much difference
in that respect.

In the end, it's easiest to download it (since it's free after all)
and whip through the tutorial, which you can probably manage in an
hour or so.  Afterwards, if you aren't inspired to try more, at least
you gave it a shot.  On the other hand, you might start to see some
potential, and if you do I predict you'll rapidly find fewer and fewer
places where using C++ seems reasonable.

-Peter




More information about the Python-list mailing list