Skip to content Skip to sidebar Skip to footer

Simple Python Server Setup

I am trying to learn python (coming from PHP), and want to set up the simplest web server so I can start coding. I found the integrated HTTP server, so I figured it should be the e

Solution 1:

Python is for writing programs in general, not only web-sites.

SimpleHTTPServer is really just a trivial HTTP server, it serves files. It doesn't try to interpret code.

If you want to do web-development with Python, you should be using a web framework. web.py is a good choice, you can check its tutorial. Another option is Django, which also has a brilliant tutorial.

Both of them have simple development servers built in, so you'll be able to start experimenting easily.

Solution 2:

If you are just starting out with python I would recommend you start with scripts that can be run from the console using python interpreter. (eg: python run1.py)

Once you have mastered the basics, you can move onto web programming. (I am guessing that you want to try web programming since you mention a web server.) In this case, you have multiple options (all of which work with Apache):

Post a Comment for "Simple Python Server Setup"