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
8aa7e999
Kaydet (Commit)
8aa7e999
authored
Ara 28, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add sys.flags.quiet attribute for the new -q option, as noted missing by Eric in #1772833.
üst
31e3b77f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
4 deletions
+14
-4
sys.rst
Doc/library/sys.rst
+5
-0
pydebug.h
Include/pydebug.h
+1
-0
NEWS
Misc/NEWS
+2
-0
main.c
Modules/main.c
+2
-3
pythonrun.c
Python/pythonrun.c
+1
-0
sysmodule.c
Python/sysmodule.c
+3
-1
No files found.
Doc/library/sys.rst
Dosyayı görüntüle @
8aa7e999
...
@@ -264,6 +264,11 @@ always available.
...
@@ -264,6 +264,11 @@ always available.
+------------------------------+------------------------------------------+
+------------------------------+------------------------------------------+
| :const:`bytes_warning` | -b |
| :const:`bytes_warning` | -b |
+------------------------------+------------------------------------------+
+------------------------------+------------------------------------------+
| :const:`quiet` | -q |
+------------------------------+------------------------------------------+
.. versionchanged:: 3.2
Added ``quiet`` attribute for the new :option:`-q` flag.
.. data:: float_info
.. data:: float_info
...
...
Include/pydebug.h
Dosyayı görüntüle @
8aa7e999
...
@@ -7,6 +7,7 @@ extern "C" {
...
@@ -7,6 +7,7 @@ extern "C" {
PyAPI_DATA
(
int
)
Py_DebugFlag
;
PyAPI_DATA
(
int
)
Py_DebugFlag
;
PyAPI_DATA
(
int
)
Py_VerboseFlag
;
PyAPI_DATA
(
int
)
Py_VerboseFlag
;
PyAPI_DATA
(
int
)
Py_QuietFlag
;
PyAPI_DATA
(
int
)
Py_InteractiveFlag
;
PyAPI_DATA
(
int
)
Py_InteractiveFlag
;
PyAPI_DATA
(
int
)
Py_InspectFlag
;
PyAPI_DATA
(
int
)
Py_InspectFlag
;
PyAPI_DATA
(
int
)
Py_OptimizeFlag
;
PyAPI_DATA
(
int
)
Py_OptimizeFlag
;
...
...
Misc/NEWS
Dosyayı görüntüle @
8aa7e999
...
@@ -15,6 +15,8 @@ Core and Builtins
...
@@ -15,6 +15,8 @@ Core and Builtins
- Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
- Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem
encoding instead of UTF-8.
encoding instead of UTF-8.
- Add sys.flags attribute for the new -q command-line option.
Library
Library
-------
-------
...
...
Modules/main.c
Dosyayı görüntüle @
8aa7e999
...
@@ -319,7 +319,6 @@ Py_Main(int argc, wchar_t **argv)
...
@@ -319,7 +319,6 @@ Py_Main(int argc, wchar_t **argv)
int
stdin_is_interactive
=
0
;
int
stdin_is_interactive
=
0
;
int
help
=
0
;
int
help
=
0
;
int
version
=
0
;
int
version
=
0
;
int
quiet
=
0
;
int
saw_unbuffered_flag
=
0
;
int
saw_unbuffered_flag
=
0
;
PyCompilerFlags
cf
;
PyCompilerFlags
cf
;
...
@@ -427,7 +426,7 @@ Py_Main(int argc, wchar_t **argv)
...
@@ -427,7 +426,7 @@ Py_Main(int argc, wchar_t **argv)
break
;
break
;
case
'q'
:
case
'q'
:
quiet
++
;
Py_QuietFlag
++
;
break
;
break
;
/* This space reserved for other options */
/* This space reserved for other options */
...
@@ -594,7 +593,7 @@ Py_Main(int argc, wchar_t **argv)
...
@@ -594,7 +593,7 @@ Py_Main(int argc, wchar_t **argv)
#endif
#endif
Py_Initialize
();
Py_Initialize
();
if
(
!
quiet
&&
(
Py_VerboseFlag
||
if
(
!
Py_QuietFlag
&&
(
Py_VerboseFlag
||
(
command
==
NULL
&&
filename
==
NULL
&&
(
command
==
NULL
&&
filename
==
NULL
&&
module
==
NULL
&&
stdin_is_interactive
)))
{
module
==
NULL
&&
stdin_is_interactive
)))
{
fprintf
(
stderr
,
"Python %s on %s
\n
"
,
fprintf
(
stderr
,
"Python %s on %s
\n
"
,
...
...
Python/pythonrun.c
Dosyayı görüntüle @
8aa7e999
...
@@ -78,6 +78,7 @@ extern void _PyGILState_Fini(void);
...
@@ -78,6 +78,7 @@ extern void _PyGILState_Fini(void);
int
Py_DebugFlag
;
/* Needed by parser.c */
int
Py_DebugFlag
;
/* Needed by parser.c */
int
Py_VerboseFlag
;
/* Needed by import.c */
int
Py_VerboseFlag
;
/* Needed by import.c */
int
Py_QuietFlag
;
/* Needed by sysmodule.c */
int
Py_InteractiveFlag
;
/* Needed by Py_FdIsInteractive() below */
int
Py_InteractiveFlag
;
/* Needed by Py_FdIsInteractive() below */
int
Py_InspectFlag
;
/* Needed to determine whether to exit at SystemError */
int
Py_InspectFlag
;
/* Needed to determine whether to exit at SystemError */
int
Py_NoSiteFlag
;
/* Suppress 'import site' */
int
Py_NoSiteFlag
;
/* Suppress 'import site' */
...
...
Python/sysmodule.c
Dosyayı görüntüle @
8aa7e999
...
@@ -1417,7 +1417,8 @@ static PyStructSequence_Field flags_fields[] = {
...
@@ -1417,7 +1417,8 @@ static PyStructSequence_Field flags_fields[] = {
#endif
#endif
/* {"unbuffered", "-u"}, */
/* {"unbuffered", "-u"}, */
/* {"skip_first", "-x"}, */
/* {"skip_first", "-x"}, */
{
"bytes_warning"
,
"-b"
},
{
"bytes_warning"
,
"-b"
},
{
"quiet"
,
"-q"
},
{
0
}
{
0
}
};
};
...
@@ -1461,6 +1462,7 @@ make_flags(void)
...
@@ -1461,6 +1462,7 @@ make_flags(void)
/* SetFlag(saw_unbuffered_flag); */
/* SetFlag(saw_unbuffered_flag); */
/* SetFlag(skipfirstline); */
/* SetFlag(skipfirstline); */
SetFlag
(
Py_BytesWarningFlag
);
SetFlag
(
Py_BytesWarningFlag
);
SetFlag
(
Py_QuietFlag
);
#undef SetFlag
#undef SetFlag
if
(
PyErr_Occurred
())
{
if
(
PyErr_Occurred
())
{
...
...
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