Is Python appropriate for web applications?

Discussion in 'Python' started by Unknown User, Apr 15, 2005.

  1. Unknown User

    Unknown User Guest

    I am a Python programmer and I'm thinking about learning PHP, which is
    similar to C++ (quite
    different from Python). I want to start writing web applications. Do you
    think if I learn
    PHP I'll develop faster? Does PHP have more features? How about the speed
    of execution? What
    are the pros and cons? Our server can run both Python, Perl and PHP, so I
    have the choice.
    Thanks for your opinion,
    Unknown User, Apr 15, 2005
    1. Advertisements

  2. If you have a look at CherryPy ( you will not want to
    go back to PHP again! ;-)

    Lorenzo Bolognini, Apr 15, 2005
    1. Advertisements

  3. Unknown User

    Peter Maas Guest

    Nobody but you can anawer this question. You'll have to try.

    Does PHP have more features?

    PHP has a rich library which probably outperforms any Python alternative
    in terms of features. But this doesn't necessarily mean that you will
    develop faster in PHP. The problem with Python is that you have to make
    a choice among many solutions (roughly ordered by inreasing complexity):

    - plain cgi
    - Quixote
    - modpython
    - CherryPy
    - Spice
    - Webware
    - Twisted
    - ZOPE

    Have a look at
    There is no simple answer. Both languages use C functions which are
    executed at CPU speed. But with interpreted code Python seems to be
    approximately 3-4 times faster than PHP (
    Peter Maas, Apr 15, 2005
  4. <rant topic="php">
    I loosed 2 hours this morning debugging PHP code. There were 2 problems.

    The first one was a typo in the name of a variable ($actegories instead
    of $categories). Instead of raising an exception, this b**d "programming
    language" (err...) just created a new variable with a NULL value. Doh :-(

    The second one was about array concatenation/union. I had used the "+"
    operator instead of the array_merge() function.

    Read the PHP doc about the "+" operators for arrays and the
    array_merge() function (don't forget that PHP uses the same construct
    for arrays and mappings - doh). Then imagine yourself programming PHP,
    and ask yourself if you'll really develop faster with such a braindead
    quick&dirty hack for language.

    bruno modulix, Apr 15, 2005
  5. Unknown User

    codecraig Guest

    for more information on web application frameworks check out

    It is a project aimed at helping web app developers to figure out which
    frameworks to use, etc.

    good luck!
    codecraig, Apr 15, 2005
  6. Unknown User

    peufeu Guest

    Set error reporting to all.
    Marvel at how it reports this simple typo in a clear and easy to
    understand way.
    Then notice it also gives you a million warnings for a lot of valid stuff
    in your code.
    My favourite is array_key_exists(). Without looking at the docs, can you
    tell me the order of the parameters ?
    peufeu, Apr 15, 2005
  7. Unknown User

    igouy Guest

    How about the speed of execution?

    The Win32 Computer Language Shootout hasn't been updated for 22 months.

    The Great Computer Language Shootout Benchmarks were updated 2 days ago

    For those original Doug Bagley tests click on "The Doug Bagley"
    igouy, Apr 15, 2005
  8. Unknown User

    Unknown User Guest

    Thank you very much.

    Unknown User, Apr 16, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.