Earlier quoted context omitted.
But im not deriding Python per-se (indeed I believe it is a fantastic language and the vast majority of my code is in Python). However when you consider it in the situation of a Web App (i.e. running under Apache or another web server) it loses most of the advantages. Not to make it worse - but if you know PHP there is no huge benefit for switching to Python :) Which is what the OP is asking "should I learn a new lan…
I wrote a PHP app back in the day. It was small and messy, had code strewn all throughout the HTML. Hell, I didn't even know how to run a PHP script without loading an URL in the web browser. That's not necessarily a fault of the language, but the books available for PHP taught me how to code that way. And the community was in a perpetual state of newbishness. At least in 2005, the IRC channels were dominated by peop…
Im not sure that contends a good reverse argument ;) but anyway... (I do stand by the statement somewhat though; it was never designed to be a web language but as a general purpose successor for ABC, any web implementations are incidental and I still contend that it cant beat purpose built "for the web" languages :))
It's a difficult call all round. I used to code PHP that way - but one good book (I forget which) and some experience with Frameworks cured me of it. It's probably similar for other languages; the person I know best who swears by Django does pretty much the same thing (horrible code)
Not good for web apps is perhaps not the point I was making (it got confused in trying to be concise). More Im saying that if the OP is sat there knowing some PHP and wondering where to go next if his aim is to make a web app I would say: go make a web app in PHP. There is no killer advantage that makes Python better for the web than PHP (for me PHP is better for the web - but that is a somewhat subjective choice).
if his prime aim is to learn a new language - and he also wants to make a web app RoR is a good choice. Again because it is tailored for the web.
If he wants to learn a language and wants something general purpose which also will do him for web work Python is a great choice.
To make things even less clear; if you want to do something specialist Python is probably your "best foot forward".
The problem with Web apps is that the web server is by far the greatest leveller. It removes any clear advantage Python has over PHP :)
I am mid/high experienced in Ruby, Python and PHP and I personally would say PHP was the best choice for a basic web app with Python bringing up a very close rear :)