wsgi.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:py-script 作者: xiaoxiamin 项目源码 文件源码
def _is_dev_mode():
    # Some embedded python interpreters won't have sys.arv
    # For details, see https://github.com/webpy/webpy/issues/87
    argv = getattr(sys, "argv", [])

    # quick hack to check if the program is running in dev mode.
    if os.environ.has_key('SERVER_SOFTWARE') \
        or os.environ.has_key('PHP_FCGI_CHILDREN') \
        or 'fcgi' in argv or 'fastcgi' in argv \
        or 'mod_wsgi' in argv:
            return False
    return True

# When running the builtin-server, enable debug mode if not already set.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号