What is the role of python for writing dynamic web pages? Does it play an equivalent role to php?
If so, can it do all the same things as php (MySql, file manipulation, sending emails, ...)
Everything that is possible in PHP is possible in Python. I'm not sure the opposite is true. And if it is, it would require jumping hoops you don't want to jump through.
Most of the things that are laughingly easy to do in PHP for the web are not so straigtforward to do in Python (by just using the standard library).
As an example making a page with a 3 field form that sends you email without any validation is pretty straightforwared in PHP compared to Python (without any framework).
For less-trivial applications that you build from scratch the numerous Python frameworks and utility libraries for web development will make your life much easier in the long run compared to if you're using anything that exists for PHP.
It's position on the web... Well, facebook is obviously not using it :)
But, companies like Disqus, Quora, Reddit, Digg, NASA and many more use it heavily for web stuff.
There's also lack of cheap (for 5 visits a day) and easy-to-deploy to hosting solutions for python applications. Although that's changing recently.
What is the role of python on the internet?