Automatically exported from code.google.com/p/planningalerts
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

CGITemplate.py 727 B

17 anni fa
12345678910111213141516171819202122232425262728293031
  1. #!/usr/bin/env python
  2. # This is the parser for %(full_name)s.
  3. # it is generated from the file CGITemplate
  4. import cgi
  5. import cgitb
  6. #cgitb.enable(display=0, logdir="/tmp")
  7. form = cgi.FieldStorage()
  8. day = form.getfirst('day')
  9. month = form.getfirst('month')
  10. year = form.getfirst('year')
  11. full_name = "%(full_name)s"
  12. short_name = "%(short_name)s"
  13. base_url = "%(base_url)s"
  14. #print "Content-Type: text/html" # HTML is following
  15. #print
  16. print "Content-Type: text/xml; charset=utf-8" # XML is following
  17. print
  18. import %(python_module)s
  19. parser = %(python_module)s.%(parser_class)s(full_name, short_name, base_url)
  20. xml = parser.getResults(day, month, year)
  21. print xml.encode("utf-8") # print the xml