For those of you who have had the opportunity of writing web applications in PHP and then as an application server (eg. Python-based solutions like CherryPy or Pylons), in what context are application servers a better alternative to PHP?
I tend to favor PHP simply because it's available on just about any web server (especially shared host), but I'm looking for other good reasons to make an informed choice. Thank you.
Python web-apps tend to require more initial setup and development than the equivalent PHP site (particularly so for small sites).  There also tend to be more reusable pieces for PHP (ie Wordpress as a blog).  Configuring a server to run Python web-apps can be a difficult process, and not always well documented.  PHP tends to be very easy to get running with Apache.
Also, as PHP is very widely used and is heavily used by beginners, there tends to be very good documentation for it.
However, Python is much more fun, and much more maintainable.  It scales well (in development complexity terms, rather than traffic).
Personally, I would also say that using Python tends to train you to solve problems in a better way.  I am definitely a better developer for having learned the Pythonic way of doing things.
PHP vs. application server?