Quoting from docs.python.org:
\"sys.argv The list of command line arguments passed to a Python script. argv[0] is the script name (it is op
sys.argv
argv[0]
When Python is invoked as python script.py then sys.argv[0] == 'script.py'. When you invoke python -c 'import sys; print sys.argv' then sys.argv[0] == '-c' indicating the script body was passed as a string on the command line.
python script.py
sys.argv[0] == 'script.py'
python -c 'import sys; print sys.argv'
sys.argv[0] == '-c'