Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2006-11-04 13:14:26


Dan <d_zakaib_at_[hidden]> writes:

> I am exposing a C++ class to python that takes a reference to a std::istream
> object and operates on it. It looks something like this:
>
> class StreamReader
> {
> public:
> StreamReader(std::istream& strm);
>
> private:
> std::istream& strm_;
> }
>
> I would like to expose this class to python allowing a python client to pass in
> any python file type object (regular file object, StringIO object, stdin, etc.),
> as a C++ client would be able to pass any std::istream derived object.
>
> Now it seems to me that someone must have encountered this problem
> before, but I haven't seen any references as to how to make this
> work.
>
> Any ideas on the best way to proceed would be appreciated.

Please bring your questions to the C++-sig:

       http://www.boost.org/more/mailing_lists.htm#cplussig

Someone there can help you.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net