]> granicus.if.org Git - python/commitdiff
Add -t option to set the Py_TabcheckFlag flag.
authorGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 19:39:15 +0000 (19:39 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 10 Apr 1998 19:39:15 +0000 (19:39 +0000)
Modules/main.c

index b62597a00b78425b1cf956c7e4973d57cc992666..190f4fd83a18204b8e43829bd4303ddf3b93d326 100644 (file)
@@ -67,21 +67,22 @@ static char *usage_top = "\
 Options and arguments (and corresponding environment variables):\n\
 -d     : debug output from parser (also PYTHONDEBUG=x)\n\
 -i     : inspect interactively after running script, (also PYTHONINSPECT=x)\n\
-         and force prompts, even if stdin does not appear to be a terminal.\n\
--O     : optimize generated bytecode (a tad).\n\
+         and force prompts, even if stdin does not appear to be a terminal\n\
+-O     : optimize generated bytecode (a tad.\n\
 -S     : don't imply 'import site' on initialization\n\
--u     : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
+-t     : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
 ";
 static char *usage_mid = "\
+-u     : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
 -v     : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\
 -x     : skip first line of source, allowing use of non-Unix forms of #!cmd\n\
 -X     : disable class based built-in exceptions\n\
 -c cmd : program passed in as string (terminates option list)\n\
 file   : program read from script file\n\
 -      : program read from stdin (default; interactive mode if a tty)\n\
-arg ...: arguments passed to program in sys.argv[1:]\n\
 ";
 static char *usage_bot = "\
+arg ...: arguments passed to program in sys.argv[1:]\n\
 Other environment variables:\n\
 PYTHONSTARTUP: file executed on interactive startup (no default)\n\
 PYTHONPATH   : '%c'-separated list of directories prefixed to the\n\
@@ -117,7 +118,7 @@ Py_Main(argc, argv)
        if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
                unbuffered = 1;
 
-       while ((c = getopt(argc, argv, "c:diOSuvxX")) != EOF) {
+       while ((c = getopt(argc, argv, "c:diOStuvxX")) != EOF) {
                if (c == 'c') {
                        /* -c is the last option; following arguments
                           that look like options are left for the
@@ -150,6 +151,10 @@ Py_Main(argc, argv)
                        Py_NoSiteFlag++;
                        break;
 
+               case 't':
+                       Py_TabcheckFlag++;
+                       break;
+
                case 'u':
                        unbuffered++;
                        break;