Start creating websites by using Python

Python by default is a general purpose scripting language and is not meant specifically for web application development (like PHP is primarily). So, you'll first need to download and install Python (choose the version that's appropriate for your OS) from www.python.org I'd recommend v2.7.1 but you can try out v3.2 if you'd like.

The other versions (IronPython, Jython, etc) are Python implementations on other platforms (.NET and JVM respectively), and in all likelihood you don't need to bother with them unless you really want to.

To start working with Python and create web applications you will also need to download and install a Python-based web framework. There are many of them, too many in fact to list here. However, there is a page on the Python Wiki that has a list of useful frameworks for web development.


Just as a disclaimer, I interpret you saying "run Python in a browser" as "making a website with Python."

If you want to start writing web applications in Python, you can either use CGI or use one of its many web app frameworks. Python is not like PHP in the sense that you can't just embed it in HTML. Many of those frameworks come with development servers that you can use to test your web app (by looking at it in a browser).

A particularly good Python web framework is Django.

I really do recommend that you do the Python tutorial before you dive into any of those frameworks, though. Python is not only for writing web applications, so you'll have to get some fundamentals down first before any of that makes sense to you.

As for installing Python, I recommend you take the version you got with your OS if you use Mac or Linux, or installing the Python 2.7.1 32-bit binary from python.org if you use Windows. The alternative implementations include a Python that runs on the Java virtual machine and one that runs on the .NET Common Language Runtime, but for your purposes the reference implementation, CPython, should work fine.


You don't "run it from a browser". You don't run PHP from a browser, either.

The way to use Python for web development is to use a framework like Django or Pyramid.

Tags:

Python