Python proper on Linux, `.a' vs `.so'

Francois Pinard pinard at iro.umontreal.ca
Thu Jun 5 07:48:19 EDT 2003


[Moshe Zadka]
> [Francois Pinard]

> > Since the original C programs executables are not so big, less than 100K
> > each (relying on installed shared libraries -- of course), I feel that
> > the idea of using Python modules from within C applications would "sell"
> > better if it was not blatantly bloating the size of executable files.

> Many people have already answered on the "how", but I want to concentrate
> on the "why".  If you are already taking the "Python hit", meaning an
> assumption that Python is installed on your target system, would it
> not be easier to write the program in Python?

If all these programs wer not already written, yes.  This set of production
programs is legacy code, that we ported over Linux from previous systems
(old QNX, in fact).  Even if the executables are not so big, the sources
use thousands of lines, sometimes a bit intervowen and complex, that I
surely do not feel like rewriting if it can be avoided.

> In other words, I'm not certain "selling" Python as a C library is
> missing an important point -- namely, that it is easier to write Python
> code than C code.

I absolutely agree with you, and everybody around me as well, nowadays.
The point I'm willing to make here, now, is that even if a production
program is already written in C, this should not be a compelling reason
for extending it with more C code, unless the additions are pretty small.
Python still give in faster development and safer maintenance, even there.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list