News for hackers. Stuff that matters.
Re:Python finally offloads some batteries by tyingq on Thursday March 17, 2022 @10:18PM (#30718089)
Since there's no dead simple examples:

  #!/usr/bin/env python
  from wsgiref.handlers import CGIHandler

  def app(environ, start_response):
      start_response('200 OK', [('Content-Type', 'text/html')])
      return [
         b"<html><head><title>foo</title></head><body>bar</body></html>\n"
      ]

  if __name__ == '__main__':
      CGIHandler().run(app)

There are no comments on this comment yet.