Python sys.arv() Examples
The following are 4
code examples of sys.arv().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
sys
, or try the search function
.
Example #1
Source File: wsgi.py From nightmare with GNU General Public License v2.0 | 5 votes |
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.
Example #2
Source File: wsgi.py From Hatkey with GNU General Public License v3.0 | 5 votes |
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 'SERVER_SOFTWARE' in os.environ \ or 'PHP_FCGI_CHILDREN' in os.environ \ 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.
Example #3
Source File: recipe-572191.py From code with MIT License | 5 votes |
def main(): if len(sys.argv) < 2 or sys.arv[1] in ('-h','--help'): print __doc__ else: url = sys.argv[1] asx = createASX(url) os.startfile(asx)
Example #4
Source File: wsgi.py From cosa-nostra with GNU General Public License v3.0 | 5 votes |
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.