On 07/10/13 16:21, Gary Oberbrunner wrote:
>
>
> - Original Message -
>> From: "John Reid"
> ...
>> Have you tried pointing the use-project boost to the boost source
>> directory rather than the boost installation directory? I don't think
On 04/10/13 19:12, Gary Oberbrunner wrote:
> Hi folks -- new to Boost.Python, old-school C/C++/Python developer.
>
> I'm trying to set up Boost.Python 1.54.0 on Windows 7, python 2.7.3, Visual
> Studio 2010. I installed boost_1_54_0 using the VS10 installer, then built
> bjam using 'bootstrap; .
Hi,
I'm having some problems asking boost.build to start the debugger or
valgrind when it runs some of my python extension bpl-test rules. I saw
in the boost.build code some comments that suggests it hijacks the
testing.launcher feature which I thought would be the way to do this.
Does anyone know
Inner classes seem to be given the wrong name or perhaps this is by
design. Could someone enlighten me? If I do:
namespace py = boost::python;
py::class_< T > outer( "Outer" );
py::scope( outer );
py::class_< U > inner( "Inner" );
then in python:
import module as M
print M.Outer.Inner
gives "M.
Hi,
I'm setting up my environment on a fresh machine with boost 1.51 and I
can't get my python debug builds to work. I've got this in my
user-config.jam
using python ;
using python : : /home/john/local/Python-2.7.3-dbg/bin/python : : :
on ;
I've built a python debug and installed it into
/home
Python. Actually, my problem is the other way around in which I have
> a Python array that needs to be converted to/ exposed in C++.
Exposing works both ways.
>
> Thanks in advance.
>
>
> ----
> *From:*
On 22/08/12 11:58, John Reid wrote:
>
>
> On 22/08/12 11:45, alfa wrote:
>> Hi John,
>>
>> I'm sorry, I'm a bit confused because previously you said that the
>> relevant implementation resides in
>> "c++/myrrh/myrrh/python/multi
multiarrays of doubles to python as numpy arrays.
Please ask if you have any specific questions.
Regards,
John.
>
>
> ----
> *From:* John Reid
> *To:* cplusplus-sig@python.org
> *Sent:* Wednesday, August 22,
dvance.
>
src/python/man_module.cpp and src/python/multi_array_to_numpy.cpp
implement a boost.python module that exposes the multi-array classes.
You have choose which data types you expose multiarrays for.
HTH,
John.
>
> -----
If you don't mind digging around in my code, you could download the
source code for the STEME python package from pypi and look in the
c++/myrrh directory. There is code to access multi_arrays from python in
there.
http://pypi.python.org/pypi/STEME/
In particular the file
c++/myrrh/myrrh/python/m
On 14/08/12 00:05, Murat Atalay wrote:
> Hello Everyone,
>
> Currently, I am trying to call C++ classes and functions from python
> inside my C++ program. I want to be able to edit the members and call
> functions from python. I am using VS2010 with boost libraries. Boost
> comes with very big em
On 25/07/12 09:44, Roman Yakovenko wrote:
> Do you use dlopen?
>
> import sys
> sys.setdlopenflags(RTLD_NOW | RTLD_GLOBAL)
>
> In multi-module environment you have to share boost python registry.
(Sorry if this is a duplicate post, the last one seemed to disappear)
Thanks, your advice fixed it:
Hi,
I'm using a version of the indexing suite I believe I copied from
Roman's codebase some time ago. I've recently refactored my project into
multiple modules and now I'm have some runtime errors when iterating
over sequences in python. At runtime I get the cryptic message:
RuntimeError: get
It
On 05/07/12 11:49, Jani Tiainen wrote:
> Hi,
>
> I'm new to python.boost library and I'm trying to use it to wrap a third
> party library. Everything else I've managed to get working - thanks to
> excellent library and lot of examples I've found around a net.
>
> Only thing I can't get working pr
pyicl is a python package that exposes the functionality of boost.icl to
python using boost.python.
Documentation: http://packages.python.org/PyICL/
PyPi page: http://pypi.python.org/pypi/PyICL/
boost.icl is a general purpose interval container library written in
C++. Its author, Joachim Faulhabe
On 16/04/12 19:13, Dave Abrahams wrote:
>
> on Mon Apr 16 2012, John Reid wrote:
>
>> On 15/04/12 03:23, Dave Abrahams wrote:
>>>
>>> You can't do this; don't even try. Each C++ class has to have a unique
>>> Python identity. If you jus
On 15/04/12 03:23, Dave Abrahams wrote:
You can't do this; don't even try. Each C++ class has to have a unique
Python identity. If you just want to refer to the same class by a
different name, you can of course:
BOOST_PYTHON_MODULE( _sandbox )
{
namespace bp = ::boost::python;
obj
Hi,
If I want to define the same class (Inner) in 2 different scopes (Outer1
and Outer 2), I can do it like this:
#include
struct Outer1 {};
struct Outer2 {};
struct Inner {};
BOOST_PYTHON_MODULE( _sandbox )
{
namespace bp = ::boost::python;
{
bp::scope scope = bp::class_< O
I recently upgraded to ipython 0.11. In 0.11 sys.argv entries are of
type unicode rather than string. All of my scripts that call into
boost.python extensions fail as my exposed functions expect arguments of
type std::string. Presumably I could recode all my functions to use
std::wstring and ev
On 24/03/11 20:14, Jim Bosch wrote:
If we start with boost/python/numpy, I think the most important tasks are:
- Add "object manager" classes for additional numpy types ("object
managers" are Boost.Python versions of Python types; right now
boost/python/numpy only supports the most important nump
On 05/11/10 14:42, John Reid wrote:
Hi,
I can't get boost.build configured for 2 different python versions, of
which one is a debug build. I follow the instructions here:
http://www.boost.org/doc/libs/1_44_0/libs/python/doc/building.html
My user-config.jam has entries like this
# de
Hi,
I can't get boost.build configured for 2 different python versions, of
which one is a debug build. I follow the instructions here:
http://www.boost.org/doc/libs/1_44_0/libs/python/doc/building.html
My user-config.jam has entries like this
# default python - this picks up a standard Ubuntu
On 26/10/10 15:12, Andreas Kloeckner wrote:
Hi John,
I've done distutils+Boost.Python for years now, without any issue. See
here for code examples:
- http://git.tiker.net/pyopencl.git
- http://git.tiker.net/pyublas.git
- http://git.tiker.net/pycuda.git
Also the instructions in README_SETUP.txt
Hi Andreas,
On 26/10/10 15:12, Andreas Kloeckner wrote:
Hi John,
I've done distutils+Boost.Python for years now, without any issue. See
here for code examples:
- http://git.tiker.net/pyopencl.git
- http://git.tiker.net/pyublas.git
- http://git.tiker.net/pycuda.git
After following the gettin
Hi,
I need to distribute a python package that includes a boost.python
extension. I've been working on Linux but I'd like the distribution to
install easily on any platform with boost and python.
I'm guessing distutils is the way to go. I'm not sure if the easiest way
is to try to get distut
Hans Meine wrote:
On Sunday 18 July 2010 11:16:29 John Reid wrote:
I'm not sure what you mean by mix-in, but my first attempt involved
defining pickle suite getstate() and setstate() methods. I did not
define a getinitargs() method. Unfortunately when the derived object was
unpickled, __i
John Reid wrote:
John Reid wrote:
John Reid wrote:
Ralf W. Grosse-Kunstleve wrote:
Ok I'll give that a whirl. I was hoping to avoid doing
__getinitargs__()
for each subclass as I have quite a few of them. If I didn't have a
C++
base class then the pickling would just work as i
John Reid wrote:
John Reid wrote:
Ralf W. Grosse-Kunstleve wrote:
Ok I'll give that a whirl. I was hoping to avoid doing
__getinitargs__()
for each subclass as I have quite a few of them. If I didn't have a C++
base class then the pickling would just work as is. There's n
John Reid wrote:
Ralf W. Grosse-Kunstleve wrote:
Ok I'll give that a whirl. I was hoping to avoid doing __getinitargs__()
for each subclass as I have quite a few of them. If I didn't have a C++
base class then the pickling would just work as is. There's no way I
can get back
Ralf W. Grosse-Kunstleve wrote:
Ok I'll give that a whirl. I was hoping to avoid doing __getinitargs__()
for each subclass as I have quite a few of them. If I didn't have a C++
base class then the pickling would just work as is. There's no way I
can get back to that sort of situation with the C
;s no way I can
get back to that sort of situation with the C++ base class is there?
Thanks,
John.
- Original Message ----
From: John Reid
To: cplusplus-sig@python.org
Sent: Sat, July 17, 2010 2:17:12 AM
Subject: [C++-sig] Pickle python subclass of C++ interface
Hi,
I'm usin
Hi,
I'm using boost.python. I want to pickle some python subclasses of a C++
base. The C++ base does not have any state, it is just an interface. Is
there an easy way to ask the python pickling machinery to ignore the C++
base? I'm not sure if I should use the boost.python pickling support or
Damien Dupuis wrote:
I'm trying to wrap a whole C++ that contains a lot of access to std::vector and
std::map.
I managed to wrap vectors but i've got problems with maps.
The following simple example fails to compile with the error:
error: no match for call to ‘(const
boost::python::detail::
Pentix wrote:
Hi, Damien!
I've got exactly the same problem... Have you got any achievements?
Have a look at:
http://www.boost.org/doc/libs/1_43_0/libs/python/doc/tutorial/doc/html/python/functions.html#python.call_policies
Damien Dupuis wrote:
error: no match for call to ‘(const
boost::
James Amundson wrote:
On 04/15/2010 03:53 AM, Murray Cumming wrote:
(If anyone can suggest a better alternative to nasty pydoc, I'd be
glad.)
I always thought it should be possible make boost.python configurable so
the user can choose which docstring format is output (standard, epytext
mar
Alexey Akimov wrote:
Thank you John,
I just installed the tool you suggested and tried to use it. However I
do not see any output. Could you give some more detailes of how the
profiling process with the google-profiler should look like?
What I do is:
1) bjam variant=profile toolset=gcc cxxfl
Alexey Akimov wrote:
Does anyone know how one may profile a python extention?
I've used the google profiler on Linux successfully in the past. It is
quite straightforward to set up inside an extension.
http://goog-perftools.sourceforge.net/doc/cpu_profiler.html
John.
__
Amos Anderson wrote:
Thanks for the responses! It sounds like there's just no way to send a
signal to C++.
Moving loops from C++ to Python around is not really a solution for us
because we need to be moving them in the other direction if they're to
be moved at all. This is molecular simulation
I've developed some boost::python code that allows conversion from numpy
arrays to boost::multi_array_refs and from boost::multi_array(ref)s to
numpy arrays without copying data. It does not deal with lifetime
management but nevertheless I've found it very useful. I know pyublas
performs a simi
I call my C++ extension from python and the C++ code in turn calls back
into python code. When the python callbacks raise exceptions I can't
easily find out the tracebacks, they stop short at the C++ interface. I
might put decorators on all my python callbacks to log the tracebacks.
Is there an
ZaeX wrote:
And in my opinion, you'd better be careful if you expect that the c++
code and python code are using the same singleton instance.
Because there're two Singleton::_instance if you export the Singleton
class to Python. one at c++ side, the other at python side.
I don't think this is
41 matches
Mail list logo