diff options
author | Barry Warsaw <barry@python.org> | 1997-08-29 21:57:49 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1997-08-29 21:57:49 (GMT) |
commit | f488af33605952e2e43bf55087a6400629e43790 (patch) | |
tree | a595fde6df4adace97c06280d3b70a1080f4611e /Modules/main.c | |
parent | 0596c2ac2850f9a978d19a2109794a7cafa20524 (diff) | |
download | cpython-f488af33605952e2e43bf55087a6400629e43790.zip cpython-f488af33605952e2e43bf55087a6400629e43790.tar.gz cpython-f488af33605952e2e43bf55087a6400629e43790.tar.bz2 |
Parse new command line option -X which enables exception classes.
Diffstat (limited to 'Modules/main.c')
-rw-r--r-- | Modules/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c index a0b60f5..92497dc 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -63,6 +63,7 @@ Options and arguments (and corresponding environment variables):\n\ and force prompts, even if stdin does not appear to be a terminal.\n\ -O : optimize generated bytecode (a tad).\n\ -u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\ +-X : use experimental class based exceptions\n\ -v : verbose (trace import statements) (also PYTHONVERBOSE=x)\n\ "; static char *usage_bot = "\ @@ -105,7 +106,7 @@ Py_Main(argc, argv) if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0') unbuffered = 1; - while ((c = getopt(argc, argv, "c:diOuv")) != EOF) { + while ((c = getopt(argc, argv, "c:diOuvX")) != EOF) { if (c == 'c') { /* -c is the last option; following arguments that look like options are left for the @@ -142,6 +143,10 @@ Py_Main(argc, argv) Py_VerboseFlag++; break; + case 'X': + Py_UseClassExceptionsFlag++; + break; + /* This space reserved for other options */ default: |