Add -E command line switch (ignore environment variables like PYTHONHOME

and PYTHONPATH).
This commit is contained in:
Neil Schemenauer 2001-07-23 16:30:27 +00:00
parent f973c6d594
commit 7d4bb9f179
12 changed files with 59 additions and 34 deletions

View file

@ -594,7 +594,7 @@ inittime(void)
m = Py_InitModule3("time", time_methods, module_doc);
d = PyModule_GetDict(m);
/* Accept 2-digit dates unless PYTHONY2K is set and non-empty */
p = getenv("PYTHONY2K");
p = Py_GETENV("PYTHONY2K");
ins(d, "accept2dyear", PyInt_FromLong((long) (!p || !*p)));
/* Squirrel away the module's dictionary for the y2k check */
Py_INCREF(d);