{"id":550,"date":"2008-10-14T08:52:33","date_gmt":"2008-10-14T12:52:33","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=550"},"modified":"2011-12-17T12:28:08","modified_gmt":"2011-12-17T16:28:08","slug":"a-really-basic-low-level-app-engine-program","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2008\/10\/a-really-basic-low-level-app-engine-program\/","title":{"rendered":"A Really Basic, Low-Level App Engine Program"},"content":{"rendered":"<p>\nThis program dumps stuff out &#8211; it shows you the reason why you want to use<\/p>\n<p>\nfrom google.appengine.ext import webapp<\/p>\n<p>\nThis is looks at the Google App Engine at its most basic CGI.  Here is some really awesome CGI documentation from the early days:<br \/>\n<a href=http:\/\/hoohoo.ncsa.uiuc.edu\/cgi\/in.html><br \/>\nhttp:\/\/hoohoo.ncsa.uiuc.edu\/cgi\/in.html<\/a><\/p>\n<pre>\nimport os<br \/>\nimport sys<br \/>\n# Print a form for testing of POST<br \/>\nprint 'Content-Type: text\/html'<br \/>\nprint ''<br \/>\nprint '&lt;form method=\"post\" action=\"\/\">'<br \/>\nprint 'Zap Data: &lt;input type=\"text\" name=\"zap\">&lt;br>'<br \/>\nprint 'Zot Data: &lt;input type=\"zot\" name=\"zap\">&lt;br>'<br \/>\nprint '&lt;input type=\"submit\">'<br \/>\nprint \"&lt;\/form>\"<br \/>\n# Dump raw CGI<br \/>\n# http:\/\/hoohoo.ncsa.uiuc.edu\/cgi\/in.html<br \/>\nprint \"&lt;pre>\"<br \/>\nprint 'Environment keys:'<br \/>\nprint ''<br \/>\nfor param in os.environ.keys():<br \/>\nprint \"%20s %s\" % (param,os.environ[param])<br \/>\nprint ''<br \/>\n# Dump the GCI data<br \/>\nprint 'Data'<br \/>\ncount = 0<br \/>\nfor l in sys.stdin:<br \/>\ncount = count + 1<br \/>\nprint l<br \/>\nif count > 100:<br \/>\nbreak<br \/>\nprint \"&lt;\/pre>\"<br \/>\n# In case you want to test file uploading<br \/>\n# print '&lt;form method=\"post\" action=\"\/\" enctype=\"multipart\/form-data\">'<br \/>\n# print 'File Data: &lt;input type=\"file\" name=\"filedat\">&lt;br>'<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This program dumps stuff out &#8211; it shows you the reason why you want to use from google.appengine.ext import webapp This is looks at the Google App Engine at its most basic CGI. Here is some really awesome CGI documentation from the early days: http:\/\/hoohoo.ncsa.uiuc.edu\/cgi\/in.html import os import sys # Print a form for testing [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-550","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=550"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/550\/revisions"}],"predecessor-version":[{"id":2673,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/550\/revisions\/2673"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}