[Python-checkins] python/dist/src/Modules readline.c,2.69,2.70

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Mon May 24 10:20:18 EDT 2004


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25522/Modules

Modified Files:
	readline.c 
Log Message:
stupid, stupid, stupid...  raw_input() already supports readline() if the
readline module is loaded.


Index: readline.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -d -r2.69 -r2.70
*** readline.c	23 May 2004 17:46:49 -0000	2.69
--- readline.c	24 May 2004 14:20:15 -0000	2.70
***************
*** 33,58 ****
  
  
- /* 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 */
  
--- 33,36 ----
***************
*** 491,495 ****
  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},
  	{"get_line_buffer", get_line_buffer, METH_NOARGS, doc_get_line_buffer},
--- 469,472 ----




More information about the Python-checkins mailing list