本文整理匯總了Python中google.appengine.ext.vendor.add方法的典型用法代碼示例。如果您正苦於以下問題:Python vendor.add方法的具體用法?Python vendor.add怎麽用?Python vendor.add使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類google.appengine.ext.vendor
的用法示例。
在下文中一共展示了vendor.add方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _SetupPaths
# 需要導入模塊: from google.appengine.ext import vendor [as 別名]
# 或者: from google.appengine.ext.vendor import add [as 別名]
def _SetupPaths():
"""Sets up the sys.path with special directories for endpointscfg.py."""
sdk_path = _FindSdkPath()
if sdk_path:
sys.path.append(sdk_path)
try:
import dev_appserver # pylint: disable=g-import-not-at-top
if hasattr(dev_appserver, 'fix_sys_path'):
dev_appserver.fix_sys_path()
else:
logging.warning(_NO_FIX_SYS_PATH_WARNING)
except ImportError:
logging.warning(_IMPORT_ERROR_WARNING)
else:
logging.warning(_NOT_FOUND_WARNING)
# Add the path above this directory, so we can import the endpoints package
# from the user's app code (rather than from another, possibly outdated SDK).
# pylint: disable=g-import-not-at-top
from google.appengine.ext import vendor
vendor.add(os.path.dirname(os.path.dirname(__file__)))