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
1ebd3f6c
Kaydet (Commit)
1ebd3f6c
authored
Agu 09, 2000
tarafından
Eric S. Raymond
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Tweak curses.wrapper so it initializes colors if they are available.
üst
46a41516
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
4 deletions
+20
-4
libcurses.tex
Doc/lib/libcurses.tex
+5
-4
wrapper.py
Lib/curses/wrapper.py
+9
-0
configure.in
configure.in
+6
-0
No files found.
Doc/lib/libcurses.tex
Dosyayı görüntüle @
1ebd3f6c
...
...
@@ -1300,8 +1300,9 @@ as its first argument, followed by any other arguments passed to
\function
{
wrapper()
}
.
\end{funcdesc}
Before calling the hook function,
\function
{
wrapper()
}
turns on
cbreak mode, turns off echo, and enables the terminal keypad. On
exit (whether normally or by exception) it restores cooked mode,
turns on echo, and disables the terminal keypad.
Before calling the hook function,
\function
{
wrapper()
}
turns on cbreak
mode, turns off echo, enables the terminal keypad, and initializes
colors if the terminal has color support. On exit (whether normally
or by exception) it restores cooked mode, turns on echo, and disables
the terminal keypad.
Lib/curses/wrapper.py
Dosyayı görüntüle @
1ebd3f6c
...
...
@@ -32,6 +32,15 @@ def wrapper(func, *rest):
# a special value like curses.KEY_LEFT will be returned
stdscr
.
keypad
(
1
)
# Start color, too. Harmless if the terminal doesn't have
# color; user can test with has_color() later on. The try/catch
# works around a minor bit of over-conscientiousness in the curses
# module -- the error return from C start_color() is ignorable.
try
:
curses
.
start_color
()
except
:
pass
res
=
apply
(
func
,
(
stdscr
,)
+
rest
)
except
:
# In the event of an error, restore the terminal
...
...
configure.in
Dosyayı görüntüle @
1ebd3f6c
...
...
@@ -1014,6 +1014,12 @@ AC_SUBST(HAVE_GETHOSTBYNAME)
# checks for system services
# (none yet)
# Cope with the DB mess. If we detect libdba, assume it's a version 2
# or later DB and should be linked first (before the DB 1.xx stuff in glibc).
# Also define an appropriate symbol so we can conditionalize code in the
# dbmmodule; the API has changed since 1.xx.
AC_CHECK_LIB(dba, __db_mutex_lock)
# Linux requires this for correct f.p. operations
AC_CHECK_FUNC(__fpu_control,
[],
...
...
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