char *tmp = new char[len];
memcpy(tmp, data, len);
outbuf.push(queue_data(tmp,len));
- out->start();
+ if (out)
+ out->start();
+}
+
+void eConsoleAppContainer::write( PyObject *data )
+{
+ char *buffer;
+ int length;
+ if (PyString_AsStringAndSize(data, &buffer, &length))
+ return;
+ if (buffer && length)
+ write(buffer, length);
}
void eConsoleAppContainer::readyWrite(int what)
void kill();
void sendCtrlC();
void write( const char *data, int len );
+ void write( PyObject *data );
bool running() { return (fd[0]!=-1) && (fd[1]!=-1) && (fd[2]!=-1); }
PSignal1<void, const char*> dataAvail;
PSignal1<void,int> dataSent;