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

Bilokon, Paul paul.bilokon at lehman.com
Thu May 15 11:38:46 CEST 2008


Many thanks, Stefan,

Do you reckon there is some open source code / code snippets that wrap
Python "file" objects?

It's not entirely trivial to wrap these classes. And since they are so
ubiquitous, I'm sure someone has already done this?

Best wishes,
Paul

-----Original Message-----
From: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org] On
Behalf Of Stefan Seefeld
Sent: Thursday, May 15, 2008 12:20 AM
To: Development of Python/C++ integration
Subject: Re: [C++-sig] Boost.Python: Wrapping functions with
std::ostream & and std::istream & arguments

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...

_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.






More information about the Cplusplus-sig mailing list