Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
简单的问题:
在我的设置文件中,我想根据我是从开发服务器还是 Apache 运行来设置一个常量。有什么优雅的方法吗?
我正在使用 mod_wsgi
采用:
try: from mod_wsgi import version as MOD_WSGI_VERSION except ImportError: MOD_WSGI_VERSION = None if MOD_WSGI_VERSION: ... running mod_wsgi