In python 2.6, just type the following command in the directory where the files to be served are:
python -m SimpleHTTPServer
In Python 3.0, SimpleHTTPServer has been merged into http.server, so change the argument to -m to http.server.SimpleHTTPRequestHandler
Sunday, October 4, 2009
how to start a simple HTTP server using Python
Labels:
command line,
commandline,
cool,
http,
module,
python,
simple
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment