For raw_input() to work, I modified builtin_raw_input() in bltinmodule.c with:
/*------------ bltinmodule_mod.c ------------*/ char* RawInputChar(char* prompt);
static PyObject * builtin_raw_input(PyObject *self, PyObject *args) { PyObject *v = NULL; char *s; int len;
if (PyArg_UnpackTuple(args, "[raw_]input", 0, 1, &v)) { PyObject *po; char *prompt; if (v != NULL) { po = PyObject_Str(v); if (po == NULL) return NULL; prompt = PyString_AsString(po); if (prompt == NULL) return NULL; } else { po = NULL; prompt = ""; }
s = RawInputChar(prompt);
Py_XDECREF(po);
len = strlen(s); return PyString_FromStringAndSize(s, len); } return NULL; }
how can i make it work ?
PythonCE-2.4.3-20060430 still has this problem.
I did fix it by modification to $src\Python\bltinmodule.c ...replace builtin_raw_input() $src\PC\dl_nt.c ...add RawInputChar() for dynamic dialog
This change is made to "python24.dll" only. Total size: 67K
I can email to you by request. Sorry, I don't know how to contribute to the project. Anyone can help?
--santiwk
Thank to "infidel". The uploaded url is here: http://sourceforge.net/tracker/index.php?func=detail&aid=1571827&group_id=104228&atid=637342
Log in to post a comment.
For raw_input() to work, I modified
builtin_raw_input() in bltinmodule.c with:
/*------------ bltinmodule_mod.c ------------*/
char* RawInputChar(char* prompt);
static PyObject *
builtin_raw_input(PyObject *self, PyObject *args)
{
PyObject *v = NULL;
char *s;
int len;
if (PyArg_UnpackTuple(args, "[raw_]input", 0, 1, &v))
{
PyObject *po;
char *prompt;
if (v != NULL) {
po = PyObject_Str(v);
if (po == NULL)
return NULL;
prompt = PyString_AsString(po);
if (prompt == NULL)
return NULL;
}
else {
po = NULL;
prompt = "";
}
s = RawInputChar(prompt);
Py_XDECREF(po);
len = strlen(s);
return PyString_FromStringAndSize(s, len);
}
return NULL;
}
how can i make it work ?
PythonCE-2.4.3-20060430 still has this problem.
I did fix it by modification to
$src\Python\bltinmodule.c ...replace builtin_raw_input()
$src\PC\dl_nt.c ...add RawInputChar() for dynamic dialog
This change is made to "python24.dll" only.
Total size: 67K
I can email to you by request.
Sorry, I don't know how to contribute to the project.
Anyone can help?
--santiwk
Thank to "infidel".
The uploaded url is here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1571827&group_id=104228&atid=637342