Python as replacement for PHP?

CountScubula me at scantek.hotmail.com
Fri Feb 27 16:21:27 EST 2004


"Erik Johnson" <ej.at.wellkeeper at dot.com> wrote in message
news:403fa54b at news.zianet.com...
> This is somewhat a NEWBIE question...
>  (snip)
>     I have not yet really "dug-in" to Python - I have dabbled and hacked a
> bit. I am advocating considering switching to Python for a number of
> reasons:
>
>         1) I think Python is cool.
>         2) We can do system administration type scripts (currently
> implemented in Perl), web page generation (PHP), and (potentially)
> client-side applications (including GUI's that make socket and/or external
> HTTP requests) in one language.
>         3) Python's interactive interpreter makes it easy to try things
out.
>         4) PyUnit - we would like to develop a robust set of tests and be
> able to do regression testing. I'm not aware of a JUnit/PyUnit analog in
> PHP. Are you?
>         5) Python has better code support for complex native data types
> (e.g., tuples, dictionaries, sequences, etc. and being able to write these
> directly in a hierarchical structure rather than building them up
piecewise
> with function calls and assignments as in PHP).
>         6) All the other standard evangeslistic points about why Python is
> better than <your favorite language here>, some of which may be valid to
us,
> some probably not. To those that have used PHP: what am I potentially
losing
> that Python really can't replace?
>
>  (snip)
>
> -ej
>
>


You should use what is best for you, but trying to settle on one laguage for
everthing is not a good idea, you will end uplocking yourself into more code
than you need sometimes.

Python is gread for server stuff, and GUI stuff, but for dynamic
intergration of html/script, PHP wins hands down.

Now I also use PHP for everything else (except GUI stuff) on servers, almost
all of my shell scripts are in php, along with autoresponders, mail filters,
data backup servers, etc..

But again, use what is quick/fast/simple to implment for you.  I use to use
perl for everthing under the sun, then slowly moved to php, not becouse it
was cool, but rather easier to set up, and with added functions designed for
dynamic site ingration.

You also need to look at what each language was desgined for, sure I can
write a dynamic web page in bash or korn, but why?  Perl was written to do
large extraction and reporting of text files, Python was written as a server
language, PHP was design specificly for dynamic/integration of web pages.

Ok, I'm done now.

--
Mike Bradley
http://www.gzentools.com  -- free online php tools





More information about the Python-list mailing list