Python for everything?

Roy Smith roy at panix.com
Thu Jun 30 23:14:32 CEST 2005


<xeys_00 at yahoo.com> wrote:
> I have read in the old days that C was used for everything. It was a
> systems programming language, and also did a lot of the same stuff
> Bash scripts and perl do now.

I learned C in "the old days" (1977 or maybe 78).  We had plenty of
other tools for scripting.  Before perl, we certainly had shell
scripts (although the early shells were not as powerful as
bash/ksh/etc), along with a healthy dose of utilities like
grep/sed/sort and awk.  I don't know anybody who tried to do
everything in C.

> My question is, can Python "do it all"?

Probably not.  I couldn't imagine writing an operating system in
Python; you'd never get the performance you need.  For very low-level
stuff that interfaces with hardware and twiddles with bits, it's
probably the wrong tool as well.

> I am wondering what to learn as my scripting language.

Python is an excellent scripting language, and I strongly urge you to
learn it.  But, for certain niches, there are better tools.  If you
main goal is to execute other processes and manipulate files, for
example, bash is probably a better tool.

Often, your choice of tool will be dictated by external constraints.
If you're trying to interface to some third-party system which only
has a perl or java API (not an uncommon situation), you're going to be
doing it in perl or java.



More information about the Python-list mailing list