logo       

Re: Re: using stdout/stderr with python: msg#00137

programming.swig

Subject: Re: Re: using stdout/stderr with python

Martin F Krafft wrote:
Some of my functions take a FILE*. I understand how one can
provide wrappers or a typemap to deal with that, but what if
I want to pass stdout and stderr into these functions as the FILE*
arguments? I could not find a way to do this.

One way would be to create C functions like GetStdin and GetStdout, and wrap them. This way, from Python, you could get access to FILE* versions of those streams. Then, you can pass those values back into your other functions.

I don't know if SWIG already has something easier built in.

Kevin
_______________________________________________
Swig maillist - Swig@xxxxxxxxxxxxxxx
http://mailman.cs.uchicago.edu/mailman/listinfo/swig



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise