summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-05-01 17:54:33 (GMT)
committerGuido van Rossum <guido@python.org>2000-05-01 17:54:33 (GMT)
commitc15a9a1f98544d3258e656503f7cbcefcda92f43 (patch)
tree5cf3d9f0eca42dc2d6797ae64d27c102d035a47a
parent22b65a8edcb86fc878dd925aaf9e68f099fbb4cb (diff)
downloadcpython-c15a9a1f98544d3258e656503f7cbcefcda92f43.zip
cpython-c15a9a1f98544d3258e656503f7cbcefcda92f43.tar.gz
cpython-c15a9a1f98544d3258e656503f7cbcefcda92f43.tar.bz2
Marc-Andre Lemburg:
Added -U command line option. With the option enabled the Python compiler interprets all "..." strings as u"..." (same with r"..." and ur"...").
-rw-r--r--Modules/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 65b22aa..c479507 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -75,6 +75,7 @@ Options and arguments (and corresponding environment variables):\n\
";
static char *usage_mid = "\
-u : unbuffered binary stdout and stderr (also PYTHONUNBUFFERED=x)\n\
+-U : Unicode literals: treats '...' literals like u'...'\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\
@@ -119,7 +120,7 @@ Py_Main(argc, argv)
if ((p = getenv("PYTHONUNBUFFERED")) && *p != '\0')
unbuffered = 1;
- while ((c = getopt(argc, argv, "c:diOStuvxX")) != EOF) {
+ while ((c = getopt(argc, argv, "c:diOStuUvxX")) != EOF) {
if (c == 'c') {
/* -c is the last option; following arguments
that look like options are left for the
@@ -172,6 +173,10 @@ Py_Main(argc, argv)
Py_UseClassExceptionsFlag = 0;
break;
+ case 'U':
+ Py_UnicodeFlag++;
+ break;
+
/* This space reserved for other options */
default: