Quote from docs.python.org :
" sys.argv list of command line arguments passed to the Python script. argv[0] is the name of the script (it depends on the operating system whether it is the full path name or not). If the command was executed using the -c command line parameter to the interpreter , argv[0] set to the string '-c' . If the script name was not passed to the Python interpreter, argv[0] is the empty string. "
Am I missing something, or sys.argv[0] always return the name of the script, but will I need to use sys.argv[1] to get '-c' ?
I am testing Python 3.2 on GNU / Linux.
source share