Hi I have a class like:
class MyClass {
public:
double myvector[3];
};
Is it possible to use it in boost.python 1.30.0?
I did not find information howto do this,
but I also did not find information thats its not possible.
My problem I get compiler errors
Could somebody clarify this?
"Chris Trengove" <[EMAIL PROTECTED]> writes:
> A question for David Abrahams (or anyone else who might have a bright idea).
>
> I have resolved quite a few of the issues involved in porting Boost.Python
> to Borland, but here is one particularly nasty problem. In
> member_function_cast.hpp you hav
A question for David Abrahams (or anyone else who might have a bright idea).
I have resolved quite a few of the issues involved in porting Boost.Python
to Borland, but here is one particularly nasty problem. In
member_function_cast.hpp you have code, which after expansion at the hands
of Boost.Pre
Kim Chang Han <[EMAIL PROTECTED]> writes:
> My Compiler is VC++ 6.0.
>
> Could you test with this compiler?
>
> Thanks in advance.
I did (with service pack 5 installed). The directory I used is enclosed.
embed.zip
Description: Zip archive
--
Dave Abrahams
Boost Consulting
www.boost-consulti
My Compiler is VC++ 6.0.
Could you test with this compiler?
Thanks in advance.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of David Abrahams
Sent: Thursday, February 27, 2003 10:54 PM
To: Boost mailing list
Subject: Re: [boost] [Boost.python] Help
Kim Chang Han <[EMAIL PROTECTED]> writes:
> Here is my simple test code modified from embedding.cpp test code(by
> Dirk Gerrits).
>
> I successfully compiled, but my excutable raise heap error assertion
> when the time freeing the string result of the function py.hello().
>
> Can I prevent this er
Here is my simple test code modified from embedding.cpp test code(by Dirk Gerrits).
I successfully compiled, but my excutable raise heap error assertion when the time
freeing the string result of the function py.hello().
Can I prevent this error?
My sampel code and result is below.
// mai
[EMAIL PROTECTED] writes:
> Hello,
>
> I'm trying to embedd and extend a C++ application.
>
> I was not able to find any good examples of how to do this.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/boost/boost/libs/python/test/embedding.cpp
> From the small tidbits of information
Hello,
I'm trying to embedd and extend a C++ application.
I was not able to find any good examples of how to do this. From the small
tidbits of information I found, plus browsing the Boost.Python sources, I
tried the following approach (starting from the "getting_started2" example,
with an added
gaoyakun <[EMAIL PROTECTED]> writes:
> Is it possible to export my class with overloaded operator [] to python so that i
>could use it as a python list?
Please post Boost.Python questions to the C++-sig:
http://www.python.org/sigs/c++-sig/
Your specific question is answered here:
http://a
Is it possible to export my class with overloaded operator [] to python so that i
could use it as a python list?
__
===
Ãâ·ÑÊÔÓÃÐÂÀË15MÊÕ·ÑÓÊÏä ¸Ï½ôÐж¯£¡
(http://vip.sina.com/sol_mail/promoti
Dan Nuffer <[EMAIL PROTECTED]> writes:
> David Abrahams wrote:
>> Dan Nuffer <[EMAIL PROTECTED]> writes:
>>>10. I added implicitly_convertible(); It
>>>compiled fine, but it didn't work:
>>> >>> import owclient
>>> >>> s = owclient.OW_String("a")
>>> >>> s.concat(owclient.OW_String("b"))
>>>
>>> >
gaoyakun <[EMAIL PROTECTED]> writes:
> how can i dealing a function which returns a raw pointer? for
> example: int * Foo (A_Class);
>
> i have tried return_value_policy(reference_existing_object) or
> return_value_policy(manage_new_object) but it doesnt work.it seem's
> that it only accept a poi
Dan Nuffer <[EMAIL PROTECTED]> writes:
> David Abrahams wrote:
>> Dan Nuffer <[EMAIL PROTECTED]> writes:
>>>10. I added implicitly_convertible(); It
>>>compiled fine, but it didn't work:
>>> >>> import owclient
>>> >>> s = owclient.OW_String("a")
>>> >>> s.concat(owclient.OW_String("b"))
>>>
>>> >
Dan Nuffer <[EMAIL PROTECTED]> writes:
> David Abrahams wrote:
>> Dan Nuffer <[EMAIL PROTECTED]> writes:
>>>6. How can I get python indexing and slicing to work on OW_String? I
>>>couldn't see any information about this in the docs.
>> The same way you do it in Python: supply a "__getitem__" and
Dan Nuffer <[EMAIL PROTECTED]> writes:
> David Abrahams wrote:
>> Dan Nuffer <[EMAIL PROTECTED]> writes:
>>>2. Is is possible to wrap member functions which take a variable
>>>number of arguments (e.g. int format(const char* fmt, ...); ) ? I
>>>tried .def("format", &OW_String::format) but that do
how can i dealing a function which returns a raw pointer?
for example: int * Foo (A_Class);
i have tried return_value_policy(reference_existing_object) or
return_value_policy(manage_new_object) but it doesnt work.it seem's that it only
accept a pointer of a C++ class like Foo* or Foo&.
David Abrahams wrote:
Dan Nuffer <[EMAIL PROTECTED]> writes:
10. I added implicitly_convertible(); It
compiled fine, but it didn't work:
>>> import owclient
>>> s = owclient.OW_String("a")
>>> s.concat(owclient.OW_String("b"))
>>> s.c_str()
'ab'
>>> s.concat("c")
Traceback (most recent call last
David Abrahams wrote:
Dan Nuffer <[EMAIL PROTECTED]> writes:
8. When I exposed the OW_String(const char*) and OW_String(char)
constructors, python would always call OW_String(char) instead of
OW_String(const char*). Is this intentional or a bug? I just removed
the OW_String(char) constructor,
David Abrahams wrote:
Dan Nuffer <[EMAIL PROTECTED]> writes:
6. How can I get python indexing and slicing to work on OW_String? I
couldn't see any information about this in the docs.
The same way you do it in Python: supply a "__getitem__" and a
"__getslice__" method.
Thanks, this works g
David Abrahams wrote:
Dan Nuffer <[EMAIL PROTECTED]> writes:
2. Is is possible to wrap member functions which take a variable
number of arguments (e.g. int format(const char* fmt, ...); ) ? I
tried .def("format", &OW_String::format) but that doesn't work.
Not directly. Conversions from Python
- Original Message -
From: "David Abrahams" <[EMAIL PROTECTED]>
> > 5. It would be nice if you gave an example in the tutorial about how
> > to specify overloads, since casting the member function pointer is not
> > something that is completely obvious (at least it took me a while to
> >
Dan Nuffer <[EMAIL PROTECTED]> writes:
> Hi,
> I've started using Boost.Python to wrap some classes from OpenWBEM.
> So far I've got one class mostly done: OW_String. So far I have been
> very impressed, and think the library is great. But I've had a few
> problems. Here's some questions and com
- Original Message -
From: "Dan Nuffer" <[EMAIL PROTECTED]>
Hi Dan,
> 1. It took me some searching to find
> BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS, I think it should be at least
> mentioned in the tutorial.
> 5. It would be nice if you gave an example in the tutorial about how to
Hi,
I've started using Boost.Python to wrap some classes from OpenWBEM. So
far I've got one class mostly done: OW_String. So far I have been very
impressed, and think the library is great. But I've had a few problems.
Here's some questions and comments:
1. It took me some searching to find
25 matches
Mail list logo