diff options
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/Modules/main.c b/Modules/main.c index 8e7c50b25f..c8298fbf76 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -2,7 +2,6 @@ #include "Python.h" #include "osdefs.h" -#include "code.h" /* For CO_FUTURE_DIVISION */ #include "import.h" #ifdef __VMS @@ -34,7 +33,7 @@ static char **orig_argv; static int orig_argc; /* command line options */ -#define BASE_OPTS "c:dEhim:OQ:StuUvVW:xX" +#define BASE_OPTS "c:dEhim:OStuvVW:xX" #ifndef RISCOS #define PROGRAM_OPTS BASE_OPTS @@ -64,7 +63,6 @@ static char *usage_2 = "\ -m mod : run library module as a script (terminates option list)\n\ -O : optimize generated bytecode (a tad; also PYTHONOPTIMIZE=x)\n\ -OO : remove doc-strings in addition to the -O optimizations\n\ --Q arg : division options: -Qold (default), -Qwarn, -Qwarnall, -Qnew\n\ -S : don't imply 'import site' on initialization\n\ -t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\ -u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\ @@ -220,33 +218,6 @@ Py_Main(int argc, char **argv) Py_DebugFlag++; break; - case 'Q': - if (strcmp(_PyOS_optarg, "old") == 0) { - Py_DivisionWarningFlag = 0; - break; - } - if (strcmp(_PyOS_optarg, "warn") == 0) { - Py_DivisionWarningFlag = 1; - break; - } - if (strcmp(_PyOS_optarg, "warnall") == 0) { - Py_DivisionWarningFlag = 2; - break; - } - if (strcmp(_PyOS_optarg, "new") == 0) { - /* This only affects __main__ */ - cf.cf_flags |= CO_FUTURE_DIVISION; - /* And this tells the eval loop to treat - BINARY_DIVIDE as BINARY_TRUE_DIVIDE */ - _Py_QnewFlag = 1; - break; - } - fprintf(stderr, - "-Q option should be `-Qold', " - "`-Qwarn', `-Qwarnall', or `-Qnew' only\n"); - return usage(2, argv[0]); - /* NOTREACHED */ - case 'i': inspect++; saw_inspect_flag = 1; @@ -288,12 +259,10 @@ Py_Main(int argc, char **argv) skipfirstline = 1; break; - case 'U': - Py_UnicodeFlag++; - break; case 'h': help++; break; + case 'V': version++; break; |