diff --git a/Yingyang/YingYang.py b/Yingyang/YingYang.py index c38004f..14a16f5 100644 --- a/Yingyang/YingYang.py +++ b/Yingyang/YingYang.py @@ -1,23 +1,43 @@ import http.server +def page(path): + print(path) + match path: + case "/ying.html": + return """ + + + YingYang + + +
Ying
+
The second word of power...
+ + + """ + + case "/yang.html": + return """ + + + YingYang + + +
Yang
+
The first word of power...
+ + + """ + + class EigenerHandler(http.server.BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) - self.send_header('Content-tyoe', 'text-html') + self.send_header('Content-type', 'text-html') self.end_headers() - - msg = """ - - - YingYang - - - Ying - - - """ + msg = page(self.path) self.wfile.write(msg.encode('utf-8')) diff --git a/client.py b/client.py index 455a7ac..84e1126 100644 --- a/client.py +++ b/client.py @@ -12,7 +12,6 @@ port = 12345 s.connect((host, port)) while True: - msg = input('Wort eingeben: ') if msg != 'STOP': s.send(msg.encode('utf-8'))