Created
August 26, 2021 05:53
-
-
Save squarism/4c405433d6d24bb98964f90d28c33f7b to your computer and use it in GitHub Desktop.
A Nice Webserver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You probably have python3 on a linux box you have lying around | |
# Save this as nice_webserver.py | |
# Run me with python3 nice_webserver.py | |
# It doesn't do anything bad, read it below | |
import socketserver | |
import time | |
class Server(socketserver.BaseRequestHandler): | |
def handle(self): | |
time.sleep(3200000000) # 100 years, give or take | |
with socketserver.TCPServer(("localhost", 9001), Server) as srv: | |
srv.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment