File: test_website.py

package info (click to toggle)
zim 0.62-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,660 kB
  • ctags: 6,996
  • sloc: python: 52,094; xml: 1,135; makefile: 45; sh: 36
file content (19 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python

import os
import subprocess

from BaseHTTPServer import HTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler

subprocess.call('./tools/build_website.sh')

os.chdir('./html')

try:
	server = HTTPServer(('', 8080), SimpleHTTPRequestHandler)
	print 'server started at http://localhost:8080'
	server.serve_forever()
except KeyboardInterrupt:
	server.socket.close()