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
116dd5eb
Kaydet (Commit)
116dd5eb
authored
Haz 16, 2017
tarafından
Xiang Zhang
Kaydeden (comit)
Mariatta
Haz 16, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-30176: Add missing curses cell attributes constants (GH-1302)
üst
c9318853
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
14 deletions
+54
-14
curses.rst
Doc/library/curses.rst
+46
-10
NEWS
Misc/NEWS
+3
-1
_cursesmodule.c
Modules/_cursesmodule.c
+5
-3
No files found.
Doc/library/curses.rst
Dosyayı görüntüle @
116dd5eb
...
@@ -1271,34 +1271,70 @@ The :mod:`curses` module defines the following data members:
...
@@ -1271,34 +1271,70 @@ The :mod:`curses` module defines the following data members:
A string representing the current version of the module. Also available as
A string representing the current version of the module. Also available as
:const:`__version__`.
:const:`__version__`.
Several constants are available to specify character cell attributes:
Some constants are available to specify character cell attributes.
The exact constants available are system dependent.
+------------------+-------------------------------+
+------------------+-------------------------------+
| Attribute | Meaning |
| Attribute | Meaning |
+==================+===============================+
+==================+===============================+
| ``A_ALTCHARSET`` | Alternate character set mode
.
|
| ``A_ALTCHARSET`` | Alternate character set mode
|
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_BLINK`` | Blink mode
.
|
| ``A_BLINK`` | Blink mode
|
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_BOLD`` | Bold mode
.
|
| ``A_BOLD`` | Bold mode
|
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_
ITALIC`` | Italic mode.
|
| ``A_
DIM`` | Dim mode
|
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_
DIM`` | Dim mode.
|
| ``A_
INVIS`` | Invisible or blank mode
|
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_NORMAL`` | Normal attribute. |
| ``A_ITALIC`` | Italic mode |
+------------------+-------------------------------+
| ``A_NORMAL`` | Normal attribute |
+------------------+-------------------------------+
| ``A_PROTECT`` | Protected mode |
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_REVERSE`` | Reverse background and |
| ``A_REVERSE`` | Reverse background and |
| | foreground colors. |
| | foreground colors |
+------------------+-------------------------------+
| ``A_STANDOUT`` | Standout mode |
+------------------+-------------------------------+
| ``A_UNDERLINE`` | Underline mode |
+------------------+-------------------------------+
| ``A_HORIZONTAL`` | Horizontal highlight |
+------------------+-------------------------------+
| ``A_LEFT`` | Left highlight |
+------------------+-------------------------------+
| ``A_LOW`` | Low highlight |
+------------------+-------------------------------+
| ``A_RIGHT`` | Right highlight |
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_
STANDOUT`` | Standout mode.
|
| ``A_
TOP`` | Top highlight
|
+------------------+-------------------------------+
+------------------+-------------------------------+
| ``A_UNDERLINE`` | Underline mode. |
| ``A_VERTICAL`` | Vertical highlight |
+------------------+-------------------------------+
| ``A_CHARTEXT`` | Bit-mask to extract a |
| | character |
+------------------+-------------------------------+
+------------------+-------------------------------+
.. versionadded:: 3.7
.. versionadded:: 3.7
``A_ITALIC`` was added.
``A_ITALIC`` was added.
Several constants are available to extract corresponding attributes returned
by some methods.
+------------------+-------------------------------+
| Bit-mask | Meaning |
+==================+===============================+
| ``A_ATTRIBUTES`` | Bit-mask to extract |
| | attributes |
+------------------+-------------------------------+
| ``A_CHARTEXT`` | Bit-mask to extract a |
| | character |
+------------------+-------------------------------+
| ``A_COLOR`` | Bit-mask to extract |
| | color-pair field information |
+------------------+-------------------------------+
Keys are referred to by integer constants with names starting with ``KEY_``.
Keys are referred to by integer constants with names starting with ``KEY_``.
The exact keycaps available are system dependent.
The exact keycaps available are system dependent.
...
...
Misc/NEWS
Dosyayı görüntüle @
116dd5eb
...
@@ -445,7 +445,7 @@ Library
...
@@ -445,7 +445,7 @@ Library
-
bpo
-
30149
:
inspect
.
signature
()
now
supports
callables
with
-
bpo
-
30149
:
inspect
.
signature
()
now
supports
callables
with
variable
-
argument
parameters
wrapped
with
partialmethod
.
variable
-
argument
parameters
wrapped
with
partialmethod
.
Patch
by
Dong
-
hee
Na
.
Patch
by
Dong
-
hee
Na
.
-
bpo
-
30436
:
importlib
.
find_spec
()
raises
ModuleNotFoundError
instead
of
-
bpo
-
30436
:
importlib
.
find_spec
()
raises
ModuleNotFoundError
instead
of
AttributeError
if
the
specified
parent
module
is
not
a
package
AttributeError
if
the
specified
parent
module
is
not
a
package
(
i
.
e
.
lacks
a
__path__
attribute
).
(
i
.
e
.
lacks
a
__path__
attribute
).
...
@@ -1216,6 +1216,8 @@ C API
...
@@ -1216,6 +1216,8 @@ C API
Documentation
Documentation
-------------
-------------
-
bpo
-
30176
:
Add
missing
attribute
related
constants
in
curses
documentation
.
-
Issue
#
30052
:
the
link
targets
for
:
func
:`
bytes
`
and
-
Issue
#
30052
:
the
link
targets
for
:
func
:`
bytes
`
and
:
func
:`
bytearray
`
are
now
their
respective
type
definitions
,
rather
:
func
:`
bytearray
`
are
now
their
respective
type
definitions
,
rather
than
the
corresponding
builtin
function
entries
.
Use
:
ref
:`
bytes
<
func
-
bytes
>`
than
the
corresponding
builtin
function
entries
.
Use
:
ref
:`
bytes
<
func
-
bytes
>`
...
...
Modules/_cursesmodule.c
Dosyayı görüntüle @
116dd5eb
...
@@ -3335,9 +3335,6 @@ PyInit__curses(void)
...
@@ -3335,9 +3335,6 @@ PyInit__curses(void)
SetDictInt
(
"A_BLINK"
,
A_BLINK
);
SetDictInt
(
"A_BLINK"
,
A_BLINK
);
SetDictInt
(
"A_DIM"
,
A_DIM
);
SetDictInt
(
"A_DIM"
,
A_DIM
);
SetDictInt
(
"A_BOLD"
,
A_BOLD
);
SetDictInt
(
"A_BOLD"
,
A_BOLD
);
#ifdef A_ITALIC
SetDictInt
(
"A_ITALIC"
,
A_ITALIC
);
#endif
SetDictInt
(
"A_ALTCHARSET"
,
A_ALTCHARSET
);
SetDictInt
(
"A_ALTCHARSET"
,
A_ALTCHARSET
);
#if !defined(__NetBSD__)
#if !defined(__NetBSD__)
SetDictInt
(
"A_INVIS"
,
A_INVIS
);
SetDictInt
(
"A_INVIS"
,
A_INVIS
);
...
@@ -3366,6 +3363,11 @@ PyInit__curses(void)
...
@@ -3366,6 +3363,11 @@ PyInit__curses(void)
SetDictInt
(
"A_VERTICAL"
,
A_VERTICAL
);
SetDictInt
(
"A_VERTICAL"
,
A_VERTICAL
);
#endif
#endif
/* ncurses extension */
#ifdef A_ITALIC
SetDictInt
(
"A_ITALIC"
,
A_ITALIC
);
#endif
SetDictInt
(
"COLOR_BLACK"
,
COLOR_BLACK
);
SetDictInt
(
"COLOR_BLACK"
,
COLOR_BLACK
);
SetDictInt
(
"COLOR_RED"
,
COLOR_RED
);
SetDictInt
(
"COLOR_RED"
,
COLOR_RED
);
SetDictInt
(
"COLOR_GREEN"
,
COLOR_GREEN
);
SetDictInt
(
"COLOR_GREEN"
,
COLOR_GREEN
);
...
...
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