diff --git a/click/_compat.py b/click/_compat.py index f15e80205..e8b06a4db 100644 --- a/click/_compat.py +++ b/click/_compat.py @@ -7,8 +7,11 @@ PY2 = sys.version_info[0] == 2 -WIN = sys.platform.startswith('win') CYGWIN = sys.platform.startswith('cygwin') +# Determine local App Engine environment, per Google's own suggestion +APP_ENGINE = ('APPENGINE_RUNTIME' in os.environ and + 'Development/' in os.environ['SERVER_SOFTWARE']) +WIN = sys.platform.startswith('win') and not APP_ENGINE DEFAULT_COLUMNS = 80