This commit is contained in:
Carelle Vanessa Mekougoum Fotsing 2019-10-29 14:46:41 +01:00
parent 63f79d426c
commit 06a03d6f1b

42
yindundyang.py Normal file
View File

@ -0,0 +1,42 @@
import http.server
class EigenerHandler(http.server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.end_headers()
if self.path == "/ying":
msg = """
<html>
<head>
<title>Titel der Seite </title>
</head>
<body>
<a href="/yang">yang</a>
<h1>ying</h1>
</body>
</html>
"""
else:
msg = """
<html>
<head>
<title> Titel der Seite </title>
</head>
<body>
<a href="/ying">ying</a>
<h1> yang</h1>
</body>
</html>
"""
self.wfile.write(msg.encode('utf-8'))
port = 12345
handler = EigenerHandler
address = ('', port)
server = http.server.HTTPServer(address, handler)
server.serve_forever()