Non-interpreted Python?

Peter Hansen peter at engcorp.com
Wed Sep 25 03:19:36 CEST 2002


Tapio Kelloniemi wrote:
> Peter Hansen <peter at engcorp.com> wrote:
> 
>>There are other approaches, but there's no point describing them until
>>you explain *why* you want to do this.  What are your requirements?
> 
> I'm using Linux and searching for a good high-level language to use in
> my projects. I don't have any special ideas, it depends on language. I
> don't like the idea of using any interpreted language, but have heard so
> much good about Python. I have used mostly C before and so it would be
> best to give up my speed requirements.

Python is definitely a "good high-level language" for a vast range of
projects.  We use it in my company for many things including internal 
utilities, a factory automated testing system for wireless telecom 
products, our Intranet (via Zope), and as the primary language (98%
of the code) in several of our main products.

I think you would be well advised to let go your fear of using an
"interpreted" language, since unless you are writing device drivers
for a living you are unlikely to experience performance bottlenecks
in most situations you'll encounter.  On the other hand, there are
*significant* advantages which you will NOT find using non-interpreted
languages, and these in many cases outweigh the few disadvantages.

A common expression around here is that developer time is worth far
more than CPU time, and in this respect Python has shown itself
capable of significantly increasing productivity in many instances.

>>>Or better, if it is possible to compile code into object format and then
>>>link with C/C++/whatever code.
>>
>>Python has excellent facilities for embedding in applications written
>>in C/C++.  Check the documentation for the relevant sections.
> 
> I have thought of writing some parts of programs in Python (some kind of
> library) and then be able to use it in C++/Ruby/anything else, if it is
> possible.

Excellent idea.  Why not take the approach many do, of writing the
whole application in Python and then (once it's working) rewriting
only those parts which profiling shows have performance problems?

-Peter




More information about the Python-list mailing list