Python as replacement for PHP?

Ville Vainio ville at spammers.com
Sat Feb 28 04:10:57 EST 2004


>>>>> "Simon" == simo  <simoninusa2001 at yahoo.co.uk> writes:

    Simon> Here's how I see it (I'm a Web Developer by trade): PHP -
    Simon> excellent database integration, if you don't want to have
    Simon> to use a Java application server for database work, go with
    Simon> PHP. Also nice templating system which even the Dreamweaver

So, how do Python's DB modules fall short of those of PHP? If they
indeed do, what should module developers do to fix this gap?

I'm so very tired of the argument that because language X specializes
in doing Q, it must be better than language Y (which is not
specialized for any particular task) for doing Q:

"Perl is only good for doing regexps, therefore it must be better than
Python for doing regexps"

"PHP is only good for doing DB connectivity /Web templating, therefore
it must be better than Python for doing them"

That just isn't logical.

    Simon> Perl - bloody fast, if you're doing lots of text
    Simon> processing/regex (e.g. XML parsing) then Perl is it,
    Simon> probably best for sysadmin tasks too. We use this for large

This is another argument I can't understand. If perl crunches your log
file in 3 minutes and Python takes 4 (but the script remains readable
and maintainable), Python would still be my choice. And regexps for
XML parsing don't always work anyway.

    Simon> The moral of the story is don't get locked into one
    Simon> technology, use the best tools for the job - especially if
    Simon> you happen to know them all! ;o)

Often Python is the best tool for all the jobs there is to do. People
just fail to see that because, driven by prejudice, they opt for the
tool that can *only* do whatever the job is at the moment. That might
have been sensible 15 years ago, but the software landscape has
changed since.

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list