fork download
  1. #!/usr/bin/python3
  2.  
  3. import cgi
  4.  
  5. print("Content-Type: text/html")
  6.  
  7. form = cgi.FieldStorage()
  8.  
  9. name = form.getvalue("name", "")
  10.  
  11. print("<html>")
  12. print("<body>")
  13.  
  14. print("<h2>Hello " + str(name) + "</h2>")
  15.  
  16. print("</body>")
  17. print("</html>")
  18.  
Success #stdin #stdout 0.06s 14912KB
stdin
Standard input is empty
stdout
Content-Type: text/html

<html>
<body>
<h2>Hello </h2>
</body>
</html>