From bbfce1b43d183cdccbe6f9a189098091f9d4a251 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 21 Sep 2008 20:06:18 +0200 Subject: Allow SWAT to be run outside of smbd. --- source4/web_server/swat/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4') diff --git a/source4/web_server/swat/__init__.py b/source4/web_server/swat/__init__.py index 8229d15a3c..d434bb260b 100644 --- a/source4/web_server/swat/__init__.py +++ b/source4/web_server/swat/__init__.py @@ -32,3 +32,8 @@ def __call__(environ, start_response): yield '\n' +if __name__ == '__main__': + from wsgiref import simple_server + httpd = simple_server.make_server('localhost', 8090, __call__) + print "Serving HTTP on port 8090..." + httpd.serve_forever() -- cgit