<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="JavaScriptSettings"> | |||||
<option name="languageLevel" value="ES6" /> | |||||
</component> | |||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" /> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="ProjectModuleManager"> | |||||
<modules> | |||||
<module fileurl="file://$PROJECT_DIR$/.idea/webeng1.iml" filepath="$PROJECT_DIR$/.idea/webeng1.iml" /> | |||||
</modules> | |||||
</component> | |||||
</project> |
<?xml version="1.0" encoding="UTF-8"?> | |||||
<module type="PYTHON_MODULE" version="4"> | |||||
<component name="NewModuleRootManager"> | |||||
<content url="file://$MODULE_DIR$" /> | |||||
<orderEntry type="inheritedJdk" /> | |||||
<orderEntry type="sourceFolder" forTests="false" /> | |||||
</component> | |||||
<component name="TestRunnerService"> | |||||
<option name="PROJECT_TEST_RUNNER" value="Unittests" /> | |||||
</component> | |||||
</module> |
import http.server | |||||
class EigeneHandler(http.server.BaseHTTPRequestHandler): | |||||
def do_GET(self): | |||||
self.send_response(200) | |||||
self.send_header("Content-type", "text-html") | |||||
self.end_headers() | |||||
if self.path == '/Ying': | |||||
msg = """ | |||||
<html> | |||||
<head> | |||||
<titel> Ying </titel> | |||||
</head> | |||||
<body> | |||||
<a href="/Yang"> Bei Klick gehe ich zu Yang </a> | |||||
</body> | |||||
</html> | |||||
""" | |||||
else: | |||||
msg = """ | |||||
<html> | |||||
<head> | |||||
<titel> Yang </titel> | |||||
</head> | |||||
<body> | |||||
<a href="/Ying"> Ying </a> | |||||
</body> | |||||
</html> | |||||
""" | |||||
self.wfile.write(msg.encode('utf-8')) | |||||
port = 12345 | |||||
handler = EigeneHandler | |||||
address = ('', port) | |||||
server = http.server.HTTPServer(address, handler) | |||||
server.serve_forever() |
import http.server | |||||
class EigeneHandler(http.server.BaseHTTPRequestHandler): | |||||
def do_GET(self): | |||||
self.send_response(200) | |||||
self.send_header("Content-type", "text-html") | |||||
self.end_headers() | |||||
msg = """ |