A: 

I only know PHP, and I really don't find it to be an absolutely awesome language. It's ok, it does the job, but it's nothing special. Python seems to be very illegible.. compact. At least that's my impression of it as someone who doesn't know it :D And I don't have a clue about Ruby ;)

eWolf
Illegible? Python? That sounds almost oxymoronic. Not to sound accusational, I'm just wondering, but where have you seen said python code?
Khanzor
Python illegible? That is one argument I have never heard against it. It's easily one of the most readable languages (if not *the* most readable) I know of. Certainly more than, for example, PHP.
Chuck
Somebody told me once they thought python was illegible, too. After further discussion, it turned out they meant perl.
Annie
+3  A: 

+Python: According to the Tiobe index, Python is more popular than Ruby by a factor of about 2.

+Ruby: With Ruby you only need to learn one web framework.

+Python: More likely to be installed already.

+Ruby: Gaining in popularity, Python is holding steady.

It's kind of a toss-up. The languages are somewhat similar in both syntax and capability. Ruby wins against any language except Smalltalk for elegance and harmony in the object model, but Python is a fine design, without the big-bag-of-functions banality that a certain other language has...

It might be easier from a motivational standpoint to learn Python first, as Ruby has a tendency to suck you in and turn you into a fanboy.

DigitalRoss
It's interesting how people become fanboys when they only know that *one* language. As soon as you know a few, you realize your language isn't the be-all end-all.
Mark
Wouldn't it be easier from a purely motivational standpoint to learn the language that sucks you in and turns you into a fanboy? Isn't that what we used to call "loving what you're doing" in the good old days, which is probably the best motivation there is? (I say this not as a Ruby fanboy. I've got plenty of criticisms for Ruby. It's just bizarre to me to hear someone say "Don't do that, you'll like it too much!")
Chuck
@Chuck: Well, if he drinks the Ruby Kool-aid then he might not want to learn Python any more, but if he learns Python first, then there might be more of a chance that he will learn both.
DigitalRoss
Rails, gaining in popularity? Are you joking. Take a look here: http://www.google.com/trends?q=django%2C+ruby+on+rails
orokusaki
@orokusaki, I said *Ruby*, not *Rails*, and I cited my source, the Tiobe index. It may not be accurate, so yes, you should decide for yourself. (That's why it's nice to cite sources. Now I'm glad I did.)
DigitalRoss
@orokusaki. I don't really care about downvotes, but really you seem to have downvoted me for something I did not even say.
DigitalRoss
+2  A: 

You should learn Python, Ruby and PHP -- then you could choose the one you like best.

Kaleb Brasee
+2  A: 

This is subjective, of course, but as someone who has used all three, I can say that I am definitely happiest with Ruby. I used with PHP for many years, though I never loved it. Then I was hired to work on a Pylons web project, so I refreshed my Python skills and was very happy with the change. However, I decided to learn Rails in parallel with Pylons and it became obvious pretty quickly that, even though I didn't know Ruby, it was a beautiful language and Rails was a brilliant framework. I did a substantial amount of work with Python, but really couldn't wait to start using Ruby.

I never considered PHP a "real" programming language. To me it's a templating language with a lot of functions. Python is a real OO scripting language which is a complete joy after PHP. However, Ruby is Python with much better anonymous functions and metaprogramming, which means a lot in terms of readability and the kind of interfaces you can design.

If you're trying to decide which one to invest time in learning for web development, to me the choice is definitely Ruby.

(I'm not sure from your question, but if you already know Ruby, Python isn't going to give you a whole lot to get excited about, except perhaps a little speed.)

Alex Reisner