Browse Source

Ying and Yang

master
Lukas Weber 3 years ago
parent
commit
4685f9ead1
3 changed files with 16 additions and 4 deletions
  1. 14
    2
      Server.py
  2. 1
    1
      Yang.html
  3. 1
    1
      Ying.html

+ 14
- 2
Server.py View File

@@ -5,5 +5,17 @@ class EigenerHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
msg =
self.wfile.write()
if(self.path == "/Yang.htlm"):
with open("Yang.html", "r") as f:
msg = f.read()
else:
with open("Ying.html", "r") as f:
msg = f.read()
self.wfile.write(msg.encode('utf-8'))

port = 12345
handler = EigenerHandler
address = ('', port)

server = http.server.HTTPServer(address, handler)
server.serve_forever()

+ 1
- 1
Yang.html View File

@@ -7,7 +7,7 @@
<body>
<div> Yang </div>
<div>
<a> href="Yong.html"</a>
<a href="Ying.html">Ying</a>
</div>
</body>
</html>

+ 1
- 1
Ying.html View File

@@ -7,7 +7,7 @@
<body>
<div> Ying </div>
<div>
<a> href= "Yang.htlm" </a>
<a href= "Yang.htlm">Yang</a>
</div>
</body>
</html>

Loading…
Cancel
Save