- header = ''
- footer = ''
-
- def run(self, port):
- from http.server import HTTPServer
- webServer = HTTPServer(('localhost', port), type(self))
- print(f"Server started http://localhost:{port}")
- try:
- webServer.serve_forever()
- except KeyboardInterrupt:
- pass
- webServer.server_close()
- print("Server stopped.")
+
+ def __init__(self, *args, **kwargs):
+ self.html_head = ['<!DOCTYPE html>\n<html>\n<meta charset="UTF-8">']
+ self.html_foot = ['</body>\n</html>']
+ self.pre_init()
+ super().__init__(*args, **kwargs)
+
+ def pre_init(self):
+ pass