Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9d871196
Kaydet (Commit)
9d871196
authored
Ara 04, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1772833: add -q command line option.
üst
cbd2ab13
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
cmdline.rst
Doc/using/cmdline.rst
+7
-0
NEWS
Misc/NEWS
+3
-0
python.man
Misc/python.man
+7
-0
main.c
Modules/main.c
+10
-3
No files found.
Doc/using/cmdline.rst
Dosyayı görüntüle @
9d871196
...
...
@@ -220,6 +220,13 @@ Miscellaneous options
Discard docstrings in addition to the :option:`-O` optimizations.
.. cmdoption:: -q
Don't display the copyright and version messages even in interactive mode.
.. versionadded:: 3.2
.. cmdoption:: -s
Don't add user site directory to sys.path
...
...
Misc/NEWS
Dosyayı görüntüle @
9d871196
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.2 Beta 1?
Core and Builtins
-----------------
- Issue #1772833: Add the -q command-line option to suppress copyright
and version output in interactive mode.
- Provide an *optimize* parameter in the built-in compile() function.
- Fixed several corner case issues on os.stat/os.lstat related to reparse
...
...
Misc/python.man
Dosyayı görüntüle @
9d871196
...
...
@@ -26,6 +26,9 @@ python \- an interpreted, interactive, object-oriented programming language
.B \-m
.I module-name
]
[
.B \-q
]
.br
[
.B \-O
...
...
@@ -145,6 +148,10 @@ to \fI.pyo\fP. Given twice, causes docstrings to be discarded.
.B \-O0
Discard docstrings in addition to the \fB-O\fP optimizations.
.TP
.B \-q
Do not print the version and copyright messages. These messages are
also suppressed in non-interactive mode.
.TP
.BI "\-Q " argument
Division control; see PEP 238. The argument must be one of "old" (the
default, int/int and long/long return an int or long), "new" (new
...
...
Modules/main.c
Dosyayı görüntüle @
9d871196
...
...
@@ -46,7 +46,7 @@ static wchar_t **orig_argv;
static
int
orig_argc
;
/* command line options */
#define BASE_OPTS L"bBc:dEhiJm:OsStuvVW:xX:?"
#define BASE_OPTS L"bBc:dEhiJm:O
q
sStuvVW:xX:?"
#define PROGRAM_OPTS BASE_OPTS
...
...
@@ -71,6 +71,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
\
-q : don't print version and copyright messages on interactive startup
\n
\
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE
\n
\
-S : don't imply 'import site' on initialization
\n
\
"
;
...
...
@@ -318,6 +319,7 @@ Py_Main(int argc, wchar_t **argv)
int
stdin_is_interactive
=
0
;
int
help
=
0
;
int
version
=
0
;
int
quiet
=
0
;
int
saw_unbuffered_flag
=
0
;
PyCompilerFlags
cf
;
...
...
@@ -424,6 +426,10 @@ Py_Main(int argc, wchar_t **argv)
PySys_AddXOption
(
_PyOS_optarg
);
break
;
case
'q'
:
quiet
++
;
break
;
/* This space reserved for other options */
default:
...
...
@@ -588,8 +594,9 @@ Py_Main(int argc, wchar_t **argv)
#endif
Py_Initialize
();
if
(
Py_VerboseFlag
||
(
command
==
NULL
&&
filename
==
NULL
&&
module
==
NULL
&&
stdin_is_interactive
))
{
if
(
!
quiet
&&
(
Py_VerboseFlag
||
(
command
==
NULL
&&
filename
==
NULL
&&
module
==
NULL
&&
stdin_is_interactive
)))
{
fprintf
(
stderr
,
"Python %s on %s
\n
"
,
Py_GetVersion
(),
Py_GetPlatform
());
if
(
!
Py_NoSiteFlag
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment