Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import logging
- import units
- import struct
- import array
- import daemon
- import urlparse
- from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
- import SocketServer
- def main():
- try:
- server = HTTPServer(('',8080), ThreadingHTTPServer)
- print 'Started httpserver on port' , 80
- server.serve_forever()
- #THE SCRIPT STOPS HERE
- station = VantageProStation()
- station.run()
- except KeyboardInterrupt:
- logging.critical('Stopping, user aborted with CTRL+C')
- print 'Stopping, user aborted with CTRL+C'
- pass
- class ThreadingHTTPServer(SocketServer.ThreadingMixIn,BaseHTTPRequestHandler):
- def do_GET(self):
- self.send_response(200)
- self.send_header('Content-type','text/html')
- self.end_headers()
- self.wfile.write('bla')
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement