]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Python3 porting: stdout and stderr redirects in the embeded python console.
authorrnv <rnv@opencascade.com>
Fri, 19 May 2017 12:32:06 +0000 (15:32 +0300)
committerrnv <rnv@opencascade.com>
Fri, 19 May 2017 12:32:06 +0000 (15:32 +0300)
tools/PyInterp/src/PyInterp_Interp.cxx

index 1caeece65800fefec8a54e01c1a29c13f06eb593..84cca0222e46171237e504be271887eee2d8a138 100644 (file)
@@ -55,8 +55,7 @@ static PyObject*
 PyStdOut_write(PyStdOut *self, PyObject *args)
 {
   char *c;
-  int l;
-  if (!PyArg_ParseTuple(args, "t#:write",&c, &l))
+  if (!PyArg_ParseTuple(args, "s",&c))
     return NULL;
   if(self->_cb==NULL) {
     if ( self->_iscerr )
@@ -136,6 +135,14 @@ static PyTypeObject PyStdOut_Type = {
   0,                            /*tp_new*/
   0,                            /*tp_free*/
   0,                            /*tp_is_gc*/
+  0,                            /*tp_bases*/
+  0,                            /*tp_mro*/
+  0,                            /*tp_cache*/
+  0,                            /*tp_subclasses*/
+  0,                            /*tp_weaklist*/
+  0,                            /*tp_del*/
+  0,                            /*tp_version_tag*/
+  0                             /*tp_finalize*/
 };
 
 #define PyStdOut_Check(v)  ((v)->ob_type == &PyStdOut_Type)