• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
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
39import wsgiref.handlers
40from google.appengine.ext import zipserve
41from google.appengine.ext import webapp
42import memcache_zipserve
43
44class MainHandler(webapp.RequestHandler):
45
46  def get(self):
47    self.response.out.write('Hello world!')
48
49def main():
50  handler = memcache_zipserve.create_handler(["""
51
52file_endpiece = """
53    ])
54  application = webapp.WSGIApplication([('/(.*)', handler)], debug=False)
55  wsgiref.handlers.CGIHandler().run(application)
56
57if __name__ == '__main__':
58    main()
59"""