[Tutor] C to Python

Remco Gerlich scarblac@pino.selwerd.nl
Wed, 21 Feb 2001 08:12:01 +0100


On Tue, Feb 20, 2001 at 07:10:10PM -0600, Katharine Stoner wrote:
> How is Python like C/C++?  Can it do everything C/C++ can do?

No. You can't use Python for very low-level things, like writing device
drivers. Also, if you need extreme speed, pure Python will often be too
slow, although you can write the critical parts in C and call them from
Python.

Python is an interpreted, very dynamic language. This give great power and
flexibility, for instance the program can change almost every aspect of
itself at runtime. It is very easy to have a database of bits of code, send
some of them out over the network, and integrate them with a program already
running at the other end; you can't do that sort of thing in C. I'm not
saying that's something you want to do often, but then I've never written a
device driver either...

Python is very powerful, in that you can do almost everything with just a
little bit of code, but it's also slow.

Most applications don't need extreme speed.

-- 
Remco Gerlich