Writing response body with BaseHTTPRequestHandler

前端 未结 4 1452
挽巷
挽巷 2021-02-03 21:06

I\'m playing a little with Python 3.2.2 and want to write a simple web server to access some data remotely. This data will be generated by Python so I don\'t want to use the Sim

4条回答
  •  悲&欢浪女
    2021-02-03 21:42

    Just use this when using Python 3.X

    self.wfile.write(bytes("

    This is a test.

    ", "utf-8"))

提交回复
热议问题