Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


raw_input() quick fix part I (bltinmodule.c)

  • 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);


            len = strlen(s);
            return PyString_FromStringAndSize(s, len);
        return NULL;

    • Sherif

      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?