|
|
|
|
|
|
|
|
elif path == "/yang": |
|
|
elif path == "/yang": |
|
|
msg = self.return_yang() |
|
|
msg = self.return_yang() |
|
|
elif path == "/squares": |
|
|
elif path == "/squares": |
|
|
msg = self.return_squares(query_components) |
|
|
|
|
|
|
|
|
msg = self.get_squares(query_components) |
|
|
else: |
|
|
else: |
|
|
msg = "Error 404" |
|
|
msg = "Error 404" |
|
|
self.wfile.write(msg.encode('utf-8')) |
|
|
self.wfile.write(msg.encode('utf-8')) |
|
|
|
|
|
|
|
|
def return_squares(self, query_components): |
|
|
|
|
|
|
|
|
def get_squares(self, query_components): |
|
|
if len(query_components) != 2: |
|
|
if len(query_components) != 2: |
|
|
msg = "Invalid number of Query Components! Two components needed." |
|
|
msg = "Invalid number of Query Components! Two components needed." |
|
|
else: |
|
|
else: |