Simple Python Server Setup
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):
- Django framework : Really good framework, has a built-in webserver and has fantastic documentation (http://www.djangobook.com/en/2.0/index.html). You need to know python basics first
- WSGI: https://code.google.com/p/modwsgi/ : Apache module for running python code
Post a Comment for "Simple Python Server Setup"