blob: 89a607d2b3e317bef5d0b3aaf2d068924ca0a5bd [file] [log] [blame]
Xavier Ducrohetb9582242009-12-01 13:03:49 -08001#!/usr/bin/python2.4
2#
3# Copyright (C) 2008 Google Inc.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17
18"""Constants for the divide_and_compress script and DirectoryZipper class."""
19
20__author__ = 'jmatt@google.com (Justin Mattson)'
21
22file_preamble = """#!/usr/bin/env python
23#
24# Copyright 2008 Google Inc.
25#
26# Licensed under the Apache License, Version 2.0 (the "License");
27# you may not use this file except in compliance with the License.
28# You may obtain a copy of the License at
29#
30# http://www.apache.org/licenses/LICENSE-2.0
31#
32# Unless required by applicable law or agreed to in writing, software
33# distributed under the License is distributed on an \"AS IS\" BASIS,
34# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35# See the License for the specific language governing permissions and
36# limitations under the License.
37#
38
Trevor Johnse52271a2012-01-27 20:02:18 -080039import wsgiref.handlers
40from google.appengine.ext import zipserve
41from google.appengine.ext import webapp
42import memcache_zipserve
43
Xavier Ducrohetb9582242009-12-01 13:03:49 -080044class MainHandler(webapp.RequestHandler):
45
46 def get(self):
47 self.response.out.write('Hello world!')
48
49def main():
Trevor Johnse52271a2012-01-27 20:02:18 -080050 handler = memcache_zipserve.create_handler(["""
Xavier Ducrohetb9582242009-12-01 13:03:49 -080051
Trevor Johnse52271a2012-01-27 20:02:18 -080052file_endpiece = """
53 ])
54 application = webapp.WSGIApplication([('/(.*)', handler)], debug=False)
Xavier Ducrohetb9582242009-12-01 13:03:49 -080055 wsgiref.handlers.CGIHandler().run(application)
56
Trevor Johnse52271a2012-01-27 20:02:18 -080057if __name__ == '__main__':
58 main()
59"""