On Tue, Mar 30, 2010 at 12:02 AM, Michele De Stefano
wrote:
> there is a much easier way to treat a FILE* as a C++ stream. The easy
> way is to use my open source library (mds-utils,
> http://code.google.com/p/mds-utils/).
If I have a C++ api like:
void foo(ostream& os);
using mds-utils, would
I think the second one, but I suggest to follow the example provided
with the doxygen documentation.
May be you will have to make a wrapper that takes a Python object as
argument, create an oFileObj object within it, and then, call your
function.
I don't have the time now to investigate the probl
On Tue, Mar 30, 2010 at 11:33 AM, Ralf W. Grosse-Kunstleve
wrote:
> http://cctbx.svn.sourceforge.net/viewvc/cctbx/trunk/boost_adaptbx/python_streambuf.h?view=markup
I have not seen this cctbx product before. It especially interesting
to me, since I am performing molecular computations, and also
Christopher,
I've figured out how you can use mds-utils.
The example is present into the documentation page of the
mds_utils::python::FileObj class.
So you have foo(ostream& os) and you would like to call it passing a
Python file object.
You cannot call
foo(oFileObj(...))
directly, simply be
> I like that the streambuf class appears to work with gzip files and
> other file objects that presumably do not have a FILE* internally.
Yes, because it simply uses the Python methods .read(), .write() etc.
> Is it necessary to explicitly invoke the streambuf object from python?
Yes. I could
On Mon, Mar 29, 2010 at 4:31 PM, Roman Yakovenko
wrote:
> May be I am missing something, but (py++) variable_t class doesn't
> have return_by_value property.
>
> Indeed it doesn't. I was having trouble figuring out how to create a
return_by_value property to pass to the make functions.
>I am not