MCPcopy Index your code
hub / github.com/webpy/webpy / _is_dev_mode

Function _is_dev_mode

web/wsgi.py:69–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67
68
69def _is_dev_mode():
70 # Some embedded python interpreters won't have sys.arv
71 # For details, see https://github.com/webpy/webpy/issues/87
72 argv = getattr(sys, "argv", [])
73
74 # quick hack to check if the program is running in dev mode.
75 if (
76 "SERVER_SOFTWARE" in os.environ
77 or "PHP_FCGI_CHILDREN" in os.environ
78 or "fcgi" in argv
79 or "fastcgi" in argv
80 or "mod_wsgi" in argv
81 ):
82 return False
83 return True
84
85
86# When running the builtin-server, enable debug mode if not already set.

Callers 1

wsgi.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected