Beispiel #1
0
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##
"""Load App Engine package from zip."""

import sys
import os
try:
    import google.appengine.runtime
except ImportError:
    from pkgutil import extend_path as _extend_path
    import google
    _path = '%s/gae_server.zip' % os.path.dirname(os.path.realpath(__file__))
    google.__path__ = _extend_path(['%s/google' % _path], google.__name__)
    import google.appengine
    google.appengine.__path__ = _extend_path(['%s/google/appengine' % _path],
                                             google.__name__)
import google.appengine.runtime
Beispiel #2
0
# source: http://stackoverflow.com/a/1676069/1869370

from pkgutil import extend_path as _extend_path
__path__ = _extend_path(__path__, __name__)

Beispiel #3
0
# Copyright 2011 Google Inc. All Rights Reserved.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# #

"""Load App Engine package from zip."""



import sys
import os
try:
  import google.appengine.runtime
except ImportError:
  from pkgutil import extend_path as _extend_path
  import google
  _path = '%s/gae_server.zip' % os.path.dirname(os.path.realpath(__file__))
  google.__path__ = _extend_path(['%s/google' % _path], google.__name__)
  import google.appengine
  google.appengine.__path__ = _extend_path(['%s/google/appengine' % _path], google.__name__)
import google.appengine.runtime
Beispiel #4
0
# Importing this module before appengine_rpc in OSS version is necessary
# because PyObjC does some ugliness with imports that isn't compatible
# with zip package imports.
# pylint: disable-msg=C6203
from cauliflowervest.client import machine_data

import os
import sys
try:
    import google.appengine.tools.appengine_rpc
except ImportError:
    from pkgutil import extend_path as _extend_path
    import google
    _path = '%s/gae_client.zip' % os.path.dirname(os.path.realpath(__file__))
    google.__path__ = _extend_path(['%s/google/' % _path], google.__name__)
    sys.path.insert(0, _path)

import fancy_urllib

from cauliflowervest import settings as base_settings
from cauliflowervest.client import settings
from cauliflowervest.client import util

# Prefix to prevent Cross Site Script Inclusion.
JSON_PREFIX = ")]}',\n"


class Error(Exception):
    """Class for domain specific exceptions."""