Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-09 Thread Stodge
Oops - I didn't see my post so I thought something had gone wrong and reposted. Apologies for the multiple posts. On Jul 9, 11:57 am, Stodge <[EMAIL PROTECTED]> wrote: > Could it be a boundary problem? The static data is initialised by the > application. The problem arises when the python module t

Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-09 Thread Stodge
Could it be a boundary problem? The static data is initialised by the application. The problem arises when the python module tries to access it. On Jul 5, 11:14 pm, Giuseppe Ottaviano <[EMAIL PROTECTED]> wrote: > > In Python, I retrive an Entity from the EntityList: > > > elist = EntityList() > >

Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-09 Thread Stodge
I wonder if it's a DLL boundary problem. On Jul 5, 11:14 pm, Giuseppe Ottaviano <[EMAIL PROTECTED]> wrote: > > In Python, I retrive an Entity from the EntityList: > > > elist = EntityList() > > elist.append(Entity()) > > elist.append(Entity()) > > > entity = elist.get_at(0) > > > entity.foo() > >

Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-09 Thread Stodge
Thanks. Maybe it's a DLL boundary issue? I'll look into this too. On Jul 5, 11:14 pm, Giuseppe Ottaviano <[EMAIL PROTECTED]> wrote: > > In Python, I retrive an Entity from the EntityList: > > > elist = EntityList() > > elist.append(Entity()) > > elist.append(Entity()) > > > entity = elist.get_at(0

Re: Boost Python - C++ class' private static data blown away before accessing in Python?

2008-07-05 Thread Giuseppe Ottaviano
In Python, I retrive an Entity from the EntityList: elist = EntityList() elist.append(Entity()) elist.append(Entity()) entity = elist.get_at(0) entity.foo() But it crashes inside foo() as the private static data is empty; or rather the string array is empty. I know before that point that the

Re: boost

2008-05-29 Thread deepest1
Thanks for help. I lost more then 10 hours on boost today, but it finally works, and I'm pleased with it. :) -- http://mail.python.org/mailman/listinfo/python-list

Re: boost

2008-05-29 Thread Ulrich Eckhardt
deepest1 wrote: > bjam --build-dir="D:\Program Files\boost_1_35_0" --toolset=gcc stage > > I got 12 failures and 8 warnings from this (other few hundrds were ok) Hmm, I remember trying to use Boost 1.35 with Python 2.5 on my Debian system and also having problems, are you sure that at least the P

Re: Boost python : get the shape of a numpy ndarray in C++ code.

2007-05-10 Thread TG
What I'm trying to say here : a numpy array is supposed to have it's shape stored as a tuple. What I want to do is to access this information from my C++ code, in order to do some validity check. So, by looking around in the doc of boost/python/numeric.hpp I was able to do this : void Layer::set_

Re: Boost python : get the shape of a numpy ndarray in C++ code.

2007-05-09 Thread Roman Yakovenko
On 9 May 2007 08:08:46 -0700, TG <[EMAIL PROTECTED]> wrote: > Hi there. > > I'm strugling here with some boost python code (damn I hate C++) : > > All I want to do is to initialize the content of an array with a numpy > ndarray parameter. I have this, which actually works. But I want to > add some

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 14:28, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > > Try to create boost-build.jam file like this: > > > > # boost-build.jam > > > boost-build C:\boost\boost_1_33_1\tools\build\v1 ; > > > Hi Rob, Thanks for the answer! > > > It did solve the error.. but produced a new one:

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 14:28, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > > Try to create boost-build.jam file like this: > > > > # boost-build.jam > > > boost-build C:\boost\boost_1_33_1\tools\build\v1 ; > > > Hi Rob, Thanks for the answer! > > > It did solve the error.. but produced a new one:

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Rob Wolfe
Soren wrote: > > Try to create boost-build.jam file like this: > > > > # boost-build.jam > > boost-build C:\boost\boost_1_33_1\tools\build\v1 ; > > > Hi Rob, Thanks for the answer! > > It did solve the error.. but produced a new one: > > C:\boost\boost_1_33_1\libs\python\example\tutorial>bjam -sT

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 12:53, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > Unable to load Boost.Build: could not find "boost-build.jam" > > --- > > Attempted search from C:\boost\boost_1_33_1\libs\python\example > > \tutorial up to t > >

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Soren
On 16 Apr., 12:53, "Rob Wolfe" <[EMAIL PROTECTED]> wrote: > Soren wrote: > > Unable to load Boost.Build: could not find "boost-build.jam" > > --- > > Attempted search from C:\boost\boost_1_33_1\libs\python\example > > \tutorial up to t > >

Re: Boost Problem! Boost.Build not found

2007-04-16 Thread Rob Wolfe
Soren wrote: > Unable to load Boost.Build: could not find "boost-build.jam" > --- > Attempted search from C:\boost\boost_1_33_1\libs\python\example > \tutorial up to t > he root and in these directories from BOOST_BUILD_PATH and BOOST_RO

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
On Mar 19, 12:49 pm, "Jon Clements" <[EMAIL PROTECTED]> wrote: > On 19 Mar, 16:40, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > > > On Mar 19, 12:00 pm, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > > > > I forgot to mention, getname is defined as: > > > const std::string &Entity::getName() const;

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Jon Clements
On 19 Mar, 16:40, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > On Mar 19, 12:00 pm, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > > > I forgot to mention, getname is defined as: > > const std::string &Entity::getName() const; > > After more reading I found the copy_const_reference, and replaced: >

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
On Mar 19, 12:00 pm, "Shawn McGrath" <[EMAIL PROTECTED]> wrote: > I forgot to mention, getname is defined as: > const std::string &Entity::getName() const; After more reading I found the copy_const_reference, and replaced: boost::python::return_internal_reference<>()); with: boost::python::ret

Re: Boost Python properties/getter functions for strings

2007-03-19 Thread Shawn McGrath
I forgot to mention, getname is defined as: const std::string &Entity::getName() const; -- http://mail.python.org/mailman/listinfo/python-list

Re: Boost Python tutorial needs MSVC?

2006-12-20 Thread Max Wilson
Cancel that--I found the answer. http://groups.google.com/group/boost-list/browse_frm/thread/5a17077679a33dca/7360f2038d6e6cca?lnk=gst&q=bjam+mingw&rnum=3#7360f2038d6e6cca Short answer: bjam.exe should not be in /bin or /usr/bin because MinGW treats programs in there differently. In my case I simp

Re: boost::python embedding example running error

2006-11-12 Thread Roman Yakovenko
On 12 Nov 2006 19:10:24 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I use boost 1.33_1, there's an example on boost::python named > embedding.cpp. When I tried to build and run it in visual studio 2005, > I got an error on this line: > > std::string hello() { return python::call_method(se

Re: Boost Python Issue

2006-08-31 Thread Neal Becker
JDJMSon wrote: > > Neal Becker wrote: > >> Shouldn't that be: >> .def("TestFunction",&TestClass::TestFunction) >> > ; > > > Yes, you're right, but I'm still getting the error. I'm using a > prebuilt python library, so later I'm going to rebuild python myself > and see if that helps, as has bee

Re: Boost Python Issue

2006-08-31 Thread JDJMSon
Neal Becker wrote: > Shouldn't that be: > .def("TestFunction",&TestClass::TestFunction) > > ; Yes, you're right, but I'm still getting the error. I'm using a prebuilt python library, so later I'm going to rebuild python myself and see if that helps, as has been suggested. Thanks. -- http://ma

Re: Boost Python Issue

2006-08-31 Thread Neal Becker
JDJMSon wrote: > I was wondering if someone here could help me with a problem I'm having > building Python extensions with the Boost.Python library. > Basically, if I have a wrapper class with something like this: > > string TestFunc() > { > return "Hello World"; > } > > BOOST_PYTHON_MODULE(Test

Re: Boost Python Issue

2006-08-31 Thread [EMAIL PROTECTED]
I believe this is more of a tools/compiler issue than a coding issue. If you are using the pre-built BOOST.Python library you get compile mismatches. I am not a Windows Visual Studio programmer (barely a programmer), I am probably not using the correct terminology. There are some settings for th

Re: Boost Build Warning

2006-08-14 Thread Roman Yakovenko
On 14 Aug 2006 10:29:08 -0700, Hoop <[EMAIL PROTECTED]> wrote: > Hi, > I am trying to run the Hello World example in Boost.Python from the > Building Hello World documentation. I believe that I have everything > set up right but I get these three warnings, > > warning: no toolsets are configured. >

Re: Boost Install

2006-08-11 Thread Neil Hodgson
Jeff: > I have attempted to follow some online install directions which do not > seem to work. I am using VS2005. VS2003 is more likely to work since that was the compiler used for the python executables distributed by python.org. > I have tried, bjam "--with-python-version[=2.4] and just g

Re: Boost Install

2006-08-11 Thread missdeer
You should set PYTHON_ROOT & PYTHON_VERSION environment variable first, then set the VC toolset path, compile bjam.exe yourself and run bjam with -sTOOLS parameter. It seems Boost has not been totally tested under VS2005, but works fine with VS2003. Good luck!   missdeer 20

Re: boost python tutorial

2006-03-23 Thread Roman Yakovenko
On 23 Mar 2006 12:36:17 -0800, MakaMaka <[EMAIL PROTECTED]> wrote: > I checked and it is. I can't use news servers at work b/c of the > firewall. Is there another way to access this mailing list? Yes, try to subscribe: http://www.python.org/community/sigs/. See c++-sig If you can use your mail o

Re: boost python tutorial

2006-03-23 Thread MakaMaka
I checked and it is. I can't use news servers at work b/c of the firewall. Is there another way to access this mailing list? -- http://mail.python.org/mailman/listinfo/python-list

Re: boost python tutorial

2006-03-23 Thread Roman Yakovenko
On 23 Mar 2006 11:17:46 -0800, MakaMaka <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to build the basic boost.python tutorial that comes with the > distribution. I'm using bjam and mingw. It builds the module, but > upon import, it gives this error: > > ImportError: dynamic module does not defin