Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python's FACS remove needs to capture stdout/stderr #109

Open
brainstorm opened this issue Jan 24, 2014 · 0 comments
Open

Python's FACS remove needs to capture stdout/stderr #109

brainstorm opened this issue Jan 24, 2014 · 0 comments
Assignees

Comments

@brainstorm
Copy link
Collaborator

Right now, it is not handled properly, since the strings returned by facs remove cannot be handled by python:

http://stackoverflow.com/questions/2420317/why-does-my-hello-world-python-c-module-work-correctly-in-everything-but-idle

void writeout(const char* nullterminated)
{
    PyObject* sysmod = PyImport_ImportModuleNoBlock("sys");
    PyObject* pystdout = PyObject_GetAttrString(sysmod, "stdout");
    PyObject* result = PyObject_CallMethod(pystdout, "write", "s", nullterminated);
    Py_XDECREF(result);
    Py_XDECREF(pystdout);
    Py_XDECREF(sysmod);    
 }
@ghost ghost assigned brainstorm Jan 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant