~matthieu-rakotojaona/zim/couchdb-store

« back to all changes in this revision

Viewing changes to tools/test_website.py

  • Committer: Matthieu Rakotojaona
  • Date: 2012-05-07 19:50:49 UTC
  • Revision ID: matthieu.rakotojaona@gmail.com-20120507195049-fza1a6q5oleuyhp6
working tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
 
 
3
import os
 
4
import subprocess
 
5
 
 
6
from BaseHTTPServer import HTTPServer
 
7
from SimpleHTTPServer import SimpleHTTPRequestHandler
 
8
 
 
9
subprocess.call('./tools/build_website.sh')
 
10
 
 
11
os.chdir('./html')
 
12
 
 
13
try:
 
14
        server = HTTPServer(('', 8080), SimpleHTTPRequestHandler)
 
15
        print 'server started at http://localhost:8080'
 
16
        server.serve_forever()
 
17
except KeyboardInterrupt:
 
18
        server.socket.close()
 
19