OSDN Git Service

Merge "Update SDK files to API 12/Android 3.1" into honeycomb-mr1
[android-x86/development.git] / scripts / divide_and_compress_constants.py
1 #!/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
22 file_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
39 import wsgiref.handlers\n'
40 from google.appengine.ext import zipserve\n'
41 from google.appengine.ext import webapp\n'
42 import memcache_zipserve\n\n\n'
43 class MainHandler(webapp.RequestHandler):
44
45   def get(self):
46     self.response.out.write('Hello world!')
47
48 def main():
49   application = webapp.WSGIApplication(['/(.*)',
50     memcache_zipserve.create_handler(["""
51
52 file_endpiece = """])),
53 ],
54 debug=False)
55   wsgiref.handlers.CGIHandler().run(application)
56
57 if __name__ == __main__:
58   main()"""