[C++-sig] Boost.Python: Wrapping functions with std::ostream & and std::istream & arguments

Stefan Seefeld seefeld at sympatico.ca
Thu May 15 01:19:51 CEST 2008


Bilokon, Paul wrote:
> Hi,
>
> I reckon the subject expresses my question pretty well.
>
> Is it possible to wrap C++ functions that take std::ostream & and
> std::istream & arguments?
>   

Yes, if you provide wrappers or converters for those stream objects, too.

> How can I convert the corresponding Python objects? Are there any
> examples?
>   

That depends on what kind of streams you expect there. You may wrap by 
types that provide the python 'file' protocol interface, for example.


Regards,
       Stefan


-- 

      ...ich hab' noch einen Koffer in Berlin...




More information about the Cplusplus-sig mailing list