blob: 4e11b6fae27c113f31ba83cc7b0ddd07b3995464 [file] [log] [blame]
The Android Open Source Project55a2c712009-03-03 19:29:09 -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\n'
23 '#\n'
24 '# Copyright 2008 Google Inc.\n'
25 '#\n'
26 '# Licensed under the Apache License, Version 2.0 (the'
27 '\"License");\n'
28 '# you may not use this file except in compliance with the '
29 'License.\n'
30 '# You may obtain a copy of the License at\n'
31 '#\n'
32 '# http://www.apache.org/licenses/LICENSE-2.0\n'
33 '#\n'
34 '# Unless required by applicable law or agreed to in writing,'
35 ' software\n'
36 '# distributed under the License is distributed on an \"AS'
37 'IS\" BASIS,\n'
38 '# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either '
39 'express or implied.\n'
40 '# See the License for the specific language governing'
41 ' permissions and\n'
42 '# limitations under the License.\n'
43 '#\n\n'
44 'import wsgiref.handlers\n'
45 'from google.appengine.ext import zipserve\n'
46 'from google.appengine.ext import webapp\n'
47 'import memcache_zipserve\n\n\n'
48 'class MainHandler(webapp.RequestHandler):\n\n'
49 ' def get(self):\n'
50 ' self.response.out.write(\'Hello world!\')\n\n'
51 'def main():\n'
52 ' application = webapp.WSGIApplication([(\'/(.*)\','
53 ' memcache_zipserve.create_handler([')
54
55file_endpiece = ('])),\n'
56 '],\n'
57 'debug=False)\n'
58 ' wsgiref.handlers.CGIHandler().run(application)\n\n'
59 'if __name__ == \'__main__\':\n'
60 ' main()')