mirror of
https://github.com/python/cpython.git
synced 2025-07-25 04:04:13 +00:00
Merged revisions 62774-62775,62785,62787-62788 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r62774 | georg.brandl | 2008-05-06 19:11:42 +0200 (Tue, 06 May 2008) | 2 lines #2773: fix description of 'g' and 'G' formatting spec. ........ r62775 | georg.brandl | 2008-05-06 19:20:54 +0200 (Tue, 06 May 2008) | 2 lines > != (!<). ........ r62785 | benjamin.peterson | 2008-05-07 00:18:11 +0200 (Wed, 07 May 2008) | 2 lines Fix logic error in Python/_warnings.c and add a test to verify ........ r62787 | benjamin.peterson | 2008-05-07 00:31:52 +0200 (Wed, 07 May 2008) | 2 lines Make the Python implementation of warnings compatible with the C implementation regarding non-callable showwarning ........ r62788 | christian.heimes | 2008-05-07 00:41:46 +0200 (Wed, 07 May 2008) | 1 line Implemented PEP 370 ........
This commit is contained in:
parent
1bf7108fd5
commit
8dc226fccd
13 changed files with 458 additions and 74 deletions
|
@ -45,7 +45,7 @@ static wchar_t **orig_argv;
|
|||
static int orig_argc;
|
||||
|
||||
/* command line options */
|
||||
#define BASE_OPTS L"bBc:dEhiJm:OStuvVW:xX?"
|
||||
#define BASE_OPTS L"bBc:dEhiJm:OsStuvVW:xX?"
|
||||
|
||||
#define PROGRAM_OPTS BASE_OPTS
|
||||
|
||||
|
@ -70,6 +70,7 @@ static char *usage_2 = "\
|
|||
-m mod : run library module as a script (terminates option list)\n\
|
||||
-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
|
||||
-OO : remove doc-strings in addition to the -O optimizations\n\
|
||||
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
|
||||
-S : don't imply 'import site' on initialization\n\
|
||||
-t : issue warnings about inconsistent tab usage (-tt: issue errors)\n\
|
||||
";
|
||||
|
@ -355,6 +356,10 @@ Py_Main(int argc, wchar_t **argv)
|
|||
Py_DontWriteBytecodeFlag++;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
Py_NoUserSiteDirectory++;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
Py_NoSiteFlag++;
|
||||
break;
|
||||
|
@ -419,6 +424,10 @@ Py_Main(int argc, wchar_t **argv)
|
|||
(p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0')
|
||||
unbuffered = 1;
|
||||
|
||||
if (!Py_NoUserSiteDirectory &&
|
||||
(p = Py_GETENV("PYTHONNOUSERSITE")) && *p != '\0')
|
||||
Py_NoUserSiteDirectory = 1;
|
||||
|
||||
if (command == NULL && module == NULL && _PyOS_optind < argc &&
|
||||
wcscmp(argv[_PyOS_optind], L"-") != 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue