Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from http.server_server import HTTPServer , BaseHTTPRequestHandler
- import urllib.parse
- class Applicacao(BaseHTTPRequestHandler):
- def do_GET(self):
- self.send_response(200)
- self.send_header("Content-Type","text/html")
- self.end_headers()
- imagem = "<img src='img/casa.png'>"
- self.wfile.write(imagem.encode())
- app = HTTPServer(('0.0.0.0',8000),Applicacao)
- app.serve_forever()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement