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
79cddc56
Kaydet (Commit)
79cddc56
authored
May 24, 2004
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
stupid, stupid, stupid... raw_input() already supports readline() if the
readline module is loaded.
üst
b98a8ba1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
39 deletions
+1
-39
libreadline.tex
Doc/lib/libreadline.tex
+1
-11
NEWS
Misc/NEWS
+0
-5
readline.c
Modules/readline.c
+0
-23
No files found.
Doc/lib/libreadline.tex
Dosyayı görüntüle @
79cddc56
...
@@ -15,10 +15,6 @@ interpreter.
...
@@ -15,10 +15,6 @@ interpreter.
The
\module
{
readline
}
module defines the following functions:
The
\module
{
readline
}
module defines the following functions:
\begin{funcdesc}
{
readline
}{
\optional
{
prompt
}}
Get a single line of input from the user.
\end{funcdesc}
\begin{funcdesc}
{
parse
_
and
_
bind
}{
string
}
\begin{funcdesc}
{
parse
_
and
_
bind
}{
string
}
Parse and execute single line of a readline init file.
Parse and execute single line of a readline init file.
\end{funcdesc}
\end{funcdesc}
...
@@ -160,7 +156,7 @@ del os, histfile
...
@@ -160,7 +156,7 @@ del os, histfile
\end{verbatim}
\end{verbatim}
The following example extends the
\class
{
code.InteractiveConsole
}
class to
The following example extends the
\class
{
code.InteractiveConsole
}
class to
support
command line editing and
history save/restore.
support history save/restore.
\begin{verbatim}
\begin{verbatim}
import code
import code
...
@@ -183,12 +179,6 @@ class HistoryConsole(code.InteractiveConsole):
...
@@ -183,12 +179,6 @@ class HistoryConsole(code.InteractiveConsole):
pass
pass
atexit.register(self.save
_
history, histfile)
atexit.register(self.save
_
history, histfile)
def raw
_
input(self, prompt=""):
line = readline.readline(prompt)
if line:
readline.add
_
history(line)
return line
def save
_
history(self, histfile):
def save
_
history(self, histfile):
readline.write
_
history
_
file(histfile)
readline.write
_
history
_
file(histfile)
\end{verbatim}
\end{verbatim}
Misc/NEWS
Dosyayı görüntüle @
79cddc56
...
@@ -207,11 +207,6 @@ Core and builtins
...
@@ -207,11 +207,6 @@ Core and builtins
Extension modules
Extension modules
-----------------
-----------------
- The readline module now exposes the readline() function to the Python
programmer. readline.readline() should be a drop-in replacement for
raw_input() but coupled with the other readline module functionality allow
programmers to offer history and input recall to their users.
- operator.isMappingType() and operator.isSequenceType() now give
- operator.isMappingType() and operator.isSequenceType() now give
fewer false positives.
fewer false positives.
...
...
Modules/readline.c
Dosyayı görüntüle @
79cddc56
...
@@ -32,28 +32,6 @@
...
@@ -32,28 +32,6 @@
#endif
#endif
/* Exported function to get a line from the user */
static
PyObject
*
py_readline
(
PyObject
*
self
,
PyObject
*
args
)
{
char
*
s
=
NULL
;
char
*
line
=
NULL
;
if
(
!
PyArg_ParseTuple
(
args
,
"|s:readline"
,
&
s
))
return
NULL
;
line
=
readline
(
s
);
if
(
line
==
NULL
)
{
PyErr_SetString
(
PyExc_EOFError
,
"End of file on input"
);
return
NULL
;
}
return
PyString_FromString
(
line
);
}
PyDoc_STRVAR
(
doc_py_readline
,
"readline([prompt]) -> line
\n
\
Prompt for and read a line of text. Raise EOFError on EOF."
);
/* Exported function to send one line to readline's init file parser */
/* Exported function to send one line to readline's init file parser */
static
PyObject
*
static
PyObject
*
...
@@ -490,7 +468,6 @@ contents of the line buffer.");
...
@@ -490,7 +468,6 @@ contents of the line buffer.");
static
struct
PyMethodDef
readline_methods
[]
=
static
struct
PyMethodDef
readline_methods
[]
=
{
{
{
"readline"
,
py_readline
,
METH_VARARGS
,
doc_py_readline
},
{
"parse_and_bind"
,
parse_and_bind
,
METH_VARARGS
,
doc_parse_and_bind
},
{
"parse_and_bind"
,
parse_and_bind
,
METH_VARARGS
,
doc_parse_and_bind
},
{
"get_line_buffer"
,
get_line_buffer
,
METH_NOARGS
,
doc_get_line_buffer
},
{
"get_line_buffer"
,
get_line_buffer
,
METH_NOARGS
,
doc_get_line_buffer
},
{
"insert_text"
,
insert_text
,
METH_VARARGS
,
doc_insert_text
},
{
"insert_text"
,
insert_text
,
METH_VARARGS
,
doc_insert_text
},
...
...
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