Python is a great alternative to PHP and here is why:
- The language is very well designed and thought of.
- It has the best package manager out there:
pip which kicks PHP's Composer ass any day.
- You can organize your project packages into virtual environments with
virtualenv.
- The language enforces clean and expressive syntax and there is a well defined style guide to follow:
pep8.
- There is a plethora of well written modules for almost anything and they are one pip install away, this can make your development insanely productive.
- It is a general purpose language, which makes it useful not just for web but also writing scripts to run anywhere that has Python installed.
- For the web, there exists a huge amount of awesome frameworks to use depending on your taste and requirements.
- And lastly, programming in Python is
fun again.
rolf wrotepython (how do I set it up?)
If you are on a popular Linux distribution it should be available already out of the box. For Windows there is a .msi for downlad and install wizard. But I highly suggest you use Python in a Unix like environment such as Mac OS or Linux for a much nicer experience.
rolf wroteI'm looking for is something that can be used as a template language in a straight-forward way (like PHP),
Python is not a template language, you will have to use a template engine such as
Jinja, its syntax is clean and awesome.
Actually you shouldn't be using PHP as a template language anymore, PHP started as a web template language but it evolved since then to become a full featured programming language. Plus the syntax is not that suitable for templating. Check out
Twig or
Smarty.