Generate a valid for use with

This fixes bugs in that caused a corrupt file to be generated for Specifically,
extra quotes are no longer added, __main__ is now in quotes, and
webapp.WSGIApplication() parameters are now correct.

Also moved the call to memcache_zipserve.create_handler() to a seperate
line for readability.

Change-Id: I8906c54e70b2889389a95b92d4fbcf05a6c3e22d
diff --git a/scripts/ b/scripts/
index 15162b7..89a607d 100644
--- a/scripts/
+++ b/scripts/
@@ -36,23 +36,24 @@
 # limitations under the License.
-import wsgiref.handlers\n'
-from google.appengine.ext import zipserve\n'
-from google.appengine.ext import webapp\n'
-import memcache_zipserve\n\n\n'
+import wsgiref.handlers
+from google.appengine.ext import zipserve
+from google.appengine.ext import webapp
+import memcache_zipserve
 class MainHandler(webapp.RequestHandler):
   def get(self):
     self.response.out.write('Hello world!')
 def main():
-  application = webapp.WSGIApplication(['/(.*)',
-    memcache_zipserve.create_handler(["""
+  handler = memcache_zipserve.create_handler(["""
-file_endpiece = """])),
+file_endpiece = """
+    ])
+  application = webapp.WSGIApplication([('/(.*)', handler)], debug=False)
-if __name__ == __main__:
-  main()"""
+if __name__ == '__main__':
+    main()
\ No newline at end of file