Python because of the Wing IDE. My post won’t fully answer your question (“Python or Ruby”) because I’m haven’t used Ruby but please bear with me.
Why did I choose Python over Ruby?
At the time I could have used either Python or Ruby and I basically flipped a coin and chose Python. I wrote several toy programs in Python and found that I was rapidly learning the syntax and idioms (I already know of bunch of other programming languages). I especially like the lack of braces (no more of those horrible endless brace placement flame wars that destroy forums).
Luckily, early on I came across a suggestion that I try out the Wing IDE. Free 30 day non-crippled trial. With Wing, I’m able to step through the code, inspect and modify variables, dynamically check for certain bugs (but I still used lint), great code editor. I paid for the package out of my own pocket.
If I had any problems, I would email the Wing developers and typically got a response within hours or, at worst, in a day or two. They (there are are only two guys) would answer any question; even programming questions.
I used a lot of free Python libraries which greatly improved my Python productivity. Since I never tried Ruby, I can’t say if Python is better or worse than Ruby (although I don’t know how one can objectively define better or worse).
With Wing, I could debug my client side Python code then seamlessly debug my back-end Python code. I would know what variables were being sent to the back-end and what variables were being set back to the client.
I tried the free Eclipse IDE before discovering Wing and I absolutely hated Eclipse for so many reasons; Eclipse is primarily oriented towards Java.
Just in case you’re wondering, I have absolutely no direct or indirect connections to Wing.