Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bba92ca

Browse files
committed
Add -t option to set the Py_TabcheckFlag flag.
1 parent 29d465b commit bba92ca

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

Modules/main.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,22 @@ static char *usage_top = "\
6767
Options and arguments (and corresponding environment variables):\n\
6868
-d : debug output from parser (also PYTHONDEBUG=x)\n\
6969
-i : inspect interactively after running script, (also PYTHONINSPECT=x)\n\
70-
and force prompts, even if stdin does not appear to be a terminal.\n\
71-
-O : optimize generated bytecode (a tad).\n\
70+
and force prompts, even if stdin does not appear to be a terminal\n\
71+
-O : optimize generated bytecode (a tad.\n\
7272
-S : don't imply 'import site' on initialization\n\
73-
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
73+
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
7474
";
7575
static char *usage_mid = "\
76+
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
7677
-v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\
7778
-x : skip first line of source, allowing use of non-Unix forms of #!cmd\n\
7879
-X : disable class based built-in exceptions\n\
7980
-c cmd : program passed in as string (terminates option list)\n\
8081
file : program read from script file\n\
8182
- : program read from stdin (default; interactive mode if a tty)\n\
82-
arg ...: arguments passed to program in sys.argv[1:]\n\
8383
";
8484
static char *usage_bot = "\
85+
arg ...: arguments passed to program in sys.argv[1:]\n\
8586
Other environment variables:\n\
8687
PYTHONSTARTUP: file executed on interactive startup (no default)\n\
8788
PYTHONPATH : '%c'-separated list of directories prefixed to the\n\
@@ -117,7 +118,7 @@ Py_Main(argc, argv)
117118
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
118119
unbuffered = 1;
119120

120-
while ((c = getopt(argc, argv, "c:diOSuvxX")) != EOF) {
121+
while ((c = getopt(argc, argv, "c:diOStuvxX")) != EOF) {
121122
if (c == 'c') {
122123
/* -c is the last option; following arguments
123124
that look like options are left for the
@@ -150,6 +151,10 @@ Py_Main(argc, argv)
150151
Py_NoSiteFlag++;
151152
break;
152153

154+
case 't':
155+
Py_TabcheckFlag++;
156+
break;
157+
153158
case 'u':
154159
unbuffered++;
155160
break;

0 commit comments

Comments
 (0)