From 60677a78f8df722a92b57732496cbd97e014849d Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 24 Feb 2010 17:06:31 +0000 Subject: [PATCH] Add some notes about Tools/scripts/serve.py. --- Tools/scripts/README | 1 + Tools/scripts/serve.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/Tools/scripts/README b/Tools/scripts/README index 4181f8f38cd..eaf9aee5b57 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -57,6 +57,7 @@ pysource.py Find Python source files redemo.py Basic regular expression demonstration facility reindent.py Change .py files to use 4-space indents. rgrep.py Reverse grep through a file (useful for big logfiles) +serve.py Small wsgiref-based web server, used in make serve in Doc setup.py Install all scripts listed here suff.py Sort a list of files by suffix svneol.py Sets svn:eol-style on all files in directory diff --git a/Tools/scripts/serve.py b/Tools/scripts/serve.py index 09d850abced..61de63d1958 100755 --- a/Tools/scripts/serve.py +++ b/Tools/scripts/serve.py @@ -1,4 +1,10 @@ #!/usr/bin/env python +''' +Small wsgiref based web server. Takes a path to serve from and an +optional port number (defaults to 8000), then tries to serve files. +Mime types are guessed from the file names, 404 errors are thrown +if the file is not found. Used for the make serve target in Doc. +''' import sys import os import mimetypes