mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add -E command line switch (ignore environment variables like PYTHONHOME
and PYTHONPATH).
This commit is contained in:
parent
f973c6d594
commit
7d4bb9f179
12 changed files with 59 additions and 34 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue