Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(170855)

Side by Side Diff: Modules/main.c

Issue 18338: python --version should send output to STDOUT
Patch Set: Created 6 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_cmd_line.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Python interpreter main program */ 1 /* Python interpreter main program */
2 2
3 #include "Python.h" 3 #include "Python.h"
4 #include "osdefs.h" 4 #include "osdefs.h"
5 5
6 #include <locale.h> 6 #include <locale.h>
7 7
8 #ifdef __VMS 8 #ifdef __VMS
9 #error "PEP 11: VMS is now unsupported, code will be removed in Python 3.4" 9 #error "PEP 11: VMS is now unsupported, code will be removed in Python 3.4"
10 #include <unixlib.h> 10 #include <unixlib.h>
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 return usage(2, argv[0]); 493 return usage(2, argv[0]);
494 /*NOTREACHED*/ 494 /*NOTREACHED*/
495 495
496 } 496 }
497 } 497 }
498 498
499 if (help) 499 if (help)
500 return usage(0, argv[0]); 500 return usage(0, argv[0]);
501 501
502 if (version) { 502 if (version) {
503 fprintf(stderr, "Python %s\n", PY_VERSION); 503 printf("Python %s\n", PY_VERSION);
504 return 0; 504 return 0;
505 } 505 }
506 506
507 if (!Py_InspectFlag && 507 if (!Py_InspectFlag &&
508 (p = Py_GETENV("PYTHONINSPECT")) && *p != '\0') 508 (p = Py_GETENV("PYTHONINSPECT")) && *p != '\0')
509 Py_InspectFlag = 1; 509 Py_InspectFlag = 1;
510 if (!saw_unbuffered_flag && 510 if (!saw_unbuffered_flag &&
511 (p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0') 511 (p = Py_GETENV("PYTHONUNBUFFERED")) && *p != '\0')
512 Py_UnbufferedStdioFlag = 1; 512 Py_UnbufferedStdioFlag = 1;
513 513
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 void 815 void
816 Py_GetArgcArgv(int *argc, wchar_t ***argv) 816 Py_GetArgcArgv(int *argc, wchar_t ***argv)
817 { 817 {
818 *argc = orig_argc; 818 *argc = orig_argc;
819 *argv = orig_argv; 819 *argv = orig_argv;
820 } 820 }
821 821
822 #ifdef __cplusplus 822 #ifdef __cplusplus
823 } 823 }
824 #endif 824 #endif
OLDNEW
« no previous file with comments | « Lib/test/test_cmd_line.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+