Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
56 views

Question Can you provide some insight what is the role of the rvalue_from_python_stage1_data convertible pointer and how is being deallocated (memory managed) in boost python? Background According to ...
user1221647's user avatar
2 votes
1 answer
56 views

I created a program that exposes class with virtual function to python using boost::python. Also I configured everything so that I could load python module that was created by boost::python and ...
Daniil Smirnov's user avatar
2 votes
0 answers
45 views

Based on Boost 1.88.0, boost::python Export Custom Exception and linked discussions I'm using the following to expose a custom C++ std::exception to python. class cException : public std::exception { ...
hallabalooza's user avatar
0 votes
1 answer
87 views

Given this class class ABC { const std::string& getid() const; /// other pure virtual methods }; class D1 : public ABC { /// override and implement virtual methods }; class D2 : public ...
MMM's user avatar
  • 982
0 votes
0 answers
52 views

I understand std::string is exposed to python by implicit converters that don't need to be registered. However, const std::string& isn't I have class Cal { const std::string& get_name() ...
MMM's user avatar
  • 982
0 votes
0 answers
86 views

I want to create a C++ library that will support both C++-based and Python-based applications running on Windows 10. The C++ application is multi-threaded, so I protect critical sections in my library ...
Anatoly G's user avatar
0 votes
0 answers
56 views

I'm currently working on a 32-bit C++ DLL in Visual Studio 2022 which uses boost::python to embed Python code. For my builds I use the include and lib directories from a full installation of 32-bit ...
Osterzine's user avatar
1 vote
1 answer
104 views

I am creating a service based on SFL (Service Framework Library). When I work from the console, it is okay, but when I run it as a service, via "sc start MyService", it issues fatal errors ...
PorisulkiP's user avatar
0 votes
0 answers
86 views

I have code in C++ that performs multiple mathematical equations. When doing it with Python, it takes a long time (about 5 minutes), and when running it in C++, it takes about 10 seconds. I want to ...
Daniel Ocanto's user avatar
0 votes
0 answers
51 views

I am following Advanced C++ / Python integration with Boost.Python tutorial to get a get a grasp on Boost-Python lib. In the example above I have: hello.cpp : #include <boost/python.hpp> #...
pippo1980's user avatar
  • 3,346
1 vote
1 answer
75 views

I am trying to create a python package from C++ code with Boost python. However when including libtorchin the code, the resulting python package shows strange errors such as Boost.Python....
ppeloton's user avatar
1 vote
0 answers
44 views

I have the following C++ code: const std::string Get(const std::map<std::string, std::string> map) { PyObject* module = PyImport_ImportModule("dummy"); boost::python::dict ...
Roy Falk's user avatar
  • 1,729
1 vote
1 answer
69 views

For some reason when exposing the below to python using Boost Python, the unique pointer constructor (the obj constructor) fails. This used to work for me before, not sure why it stopped. #pragma once ...
SpeakX's user avatar
  • 427
0 votes
0 answers
86 views

After following this page on how to install boost in Visual Studio 2022, I added the hello world for Boost.Python into the main.cpp file. However, even though the program builds and runs successfully, ...
AsianTemptation's user avatar
0 votes
0 answers
52 views

I have a python script that calls some C++ code, and in the C++ part, I want to define some static python object, for example: static boost::python::list obj. However, according to pybind11 issue 1598 ...
konchy's user avatar
  • 893
0 votes
1 answer
196 views

pip3 install py3exiv2 gives error: In file included from src/exiv2wrapper.cpp:27: src/exiv2wrapper.hpp:33:10: fatal error: 'exiv2/exiv2.hpp' file not found 33 | #include "exiv2/...
Marc Cabana's user avatar
0 votes
0 answers
39 views

I have a python library written in c++ and specifically a function that retrieves a value from a redis server using boost async io: python::object redis::connexion::py_mget(python::object keys) { ...
user195066's user avatar
1 vote
1 answer
166 views

I'm having trouble integrating the Boost library into my project. I'm developing a wrapper of boost library for python usage and i started from the "minkowski.cpp" example given by boost. ...
Andrea DM's user avatar
0 votes
2 answers
77 views

I'm using boost 1.82, and if I use boost::python::raw_function, I get warning C4267 even if I explicitly use size_t. #include <boost/python.hpp> #include <iostream> boost::python::object ...
DJMcMayhem's user avatar
  • 7,750
0 votes
1 answer
1k views

I'm not sure why I can't find any good discussion of this, I have been searching since yesterday. How do you return a class object from C++ binding and use its methods in Python i.e.: class A { ......
Tommy Wolfheart's user avatar
1 vote
1 answer
171 views

I have the following struct: enum class Tag { QR, April, Chili } struct Options { std::list<Tag> tags; } that I want to expose in a Python package using boost python. Here's my ...
Cyril's user avatar
  • 563
0 votes
0 answers
75 views

I have the following structures: enum class Tag { QR, April, Chili } enum class Constraint { Tag, GPS, User } struct Options { boost::optional<std::list<Tag>> ...
Cyril's user avatar
  • 563
0 votes
1 answer
39 views

We have functions like void myf(const boost::python::list& l) {...} is there a way to accept any python iterable, or less generically, any collection?
MMM's user avatar
  • 982
0 votes
1 answer
152 views

I have simplified my code to the following compilable code, with gcc13, boost 1.78 and python3. #include <iostream> #include <string> #include <boost/python.hpp> template <...
MMM's user avatar
  • 982
0 votes
1 answer
43 views

So I am working with python boost. The goal for me is to be able to overload c++ functions from python modules. I have managed that, but I have observed a weird behavior when using aliases. I have ...
Flabala's user avatar
  • 99
0 votes
1 answer
46 views

We expose C++ code to python via boost.python. We produce release and debug builds. release builds produce lib.so files debug builds produce lib-g.so files. Our python code then import lib<mymodule&...
MMM's user avatar
  • 982
1 vote
1 answer
359 views

I am trying to use conan for the very first time to try to retrieve Boost.Python and start a project using it. I have having issues that once I open my visual studio solution I get a red underline ...
memelord23's user avatar
2 votes
1 answer
1k views

Boost build not generate libboost_python38.so.1.74.0 for python modules in my project. I tried build boost libraries like this, but libboost_python38.so.1.74.0 not appears for me: wget https://...
AizenVorona's user avatar
0 votes
1 answer
125 views

I'm trying to create example boost.python module, but i have only link errors The boost was built with command b2 --with-python address-model=64 toolset=msvc --build-dir=build link=shared install ...
User Userovich's user avatar
0 votes
0 answers
143 views

I get this error: undefined symbol: _ZN5boost6python15instance_holder8allocateEP7_objectmmm which is basically undefined symbol: boost::python::instance_holder::allocate::object How to solve that? I ...
Seif Elsehely's user avatar
0 votes
1 answer
32 views

I am trying to expose a C++ class to Python using Boost Python Library. I have a class with an array of 3 elements and I wish to be able to get the value of element by the names of "first", &...
rrsszzcc's user avatar
0 votes
1 answer
100 views

I am trying to have an array using boost python #include <boost/python.hpp> #include <memory> #include <vector> class MyObject { public: MyObject(int value) : value_(...
BadJerry's user avatar
  • 156
0 votes
1 answer
467 views

I have a C++ function ExecuteFunction that takes as input another function f. I would like to expose ExecuteFunction in Python with Boost.Python, and call it from Python with either Python functions ...
akerstjens's user avatar
2 votes
0 answers
361 views

I'm re-posting my issue from https://github.com/pybind/pybind11/discussions/4477 to here as I'm not getting much luck there for now... To summarize I have C++ application that has Python in it via ...
Dariusz's user avatar
  • 1,076
1 vote
0 answers
109 views

I would like to expose to python a function accepting required positional arguments,optional keyword arguments, variadic positional arguments, and variadic keyword arguments. For example: def f( a,b,c=...
IMas's user avatar
  • 29
0 votes
0 answers
83 views

I have classes and functions which I don't want to change, but I want to expose them to Python with some additional functionalities (Dunder Methods etc.). So what I have is derived class like follows: ...
kacpo1's user avatar
  • 575
0 votes
0 answers
157 views

I want to create C++ wrapper for Numpy array. For that purpose I need to hold reference to Numpy array (for returning it to Python later) and reference to raw data of that array. For that I've wrote ...
kacpo1's user avatar
  • 575
2 votes
0 answers
81 views

I have a code calling some Python from C++ (with Boost.Python). I have an exception thrown when trying to get the error from Python. But my question is quite general : If the execution throws ...
Caduchon's user avatar
  • 5,278
0 votes
0 answers
124 views

I try to track a memory leak in a code using boost::python. I reduced my code to a simple main. This simple main run with valgrind without error/leak : valgrind --leak-check=full --track-origins=yes /...
Caduchon's user avatar
  • 5,278
2 votes
1 answer
529 views

I have built Boost_1.76 with the following configurations. Compiler: MSVC 143 Build Tools: bootstrap.bat, b2 engine Python Version: 3.7 b2 Command: b2 --build-dir=build/x64 address-model=64 threading=...
disguisedtoast's user avatar
2 votes
1 answer
1k views

I try to create a simple C++ module for python with Boost, but python gives me ModuleNotFoundError: No module named 'MyLib'. The .py file is in the same location as MyLib.dll. UPD: if i change dll to ...
様 貴方の微笑's user avatar
-1 votes
1 answer
60 views

I have a requirement to create, but not throw, a python RuntimeError. I'm using Boost python, the code so far: static boost::python::object builtins = boost::python::import("builtins"); ...
P45 Imminent's user avatar
  • 8,641
0 votes
0 answers
63 views

We are trying to set the namespace of a boost::python::object, with the following code In PyROOTGlobals.h we declare: #ifndef PyROOTGlobals_h #define PyROOTGlobals_h #include <boost/python.hpp> ...
Lukas Kretschmann's user avatar
0 votes
0 answers
447 views

I have a Boost.Python function that I need to return a string or raise an exception if one does not exist. The code roughly looks like this (but isn't 100% exact) #include <boost/python.hpp> ...
ColinKennedy's user avatar
  • 1,026
0 votes
0 answers
498 views

I try to compile the Frechet-CUDA package for python. I installed C++ via Visual Studio and installed dlib and cmake for python to compile the package. Furthermore added boost 3.18. Still get the ...
mugdi's user avatar
  • 435
0 votes
1 answer
205 views

I am trying to have a Boost Python function return a Python object which is a subclass of a Python builtin class (here str): My first method involves creating the class in a Python module, mystr.py: ...
Jan Christoph Terasa's user avatar
2 votes
0 answers
366 views

I am trying to pass an argument by reference to a Python function from C++ using the Boost Python library (as well as the Boost Numpy extension). The object in question is an ndarray, and passing it ...
Hufh294's user avatar
  • 89
1 vote
1 answer
398 views

While porting program from boost-python2 to boost-python3, I came to situation, that boost program with embedded python3 crashes on exit, though same code built with python 2.7 works well. This case ...
dhyan.nataraj's user avatar
0 votes
1 answer
277 views

I have a piece of software that embeds python using libboost-python. It creates a python module in C++ runtime, and then imports it from python code. For python2.7 this works like this: test_module.py ...
dhyan.nataraj's user avatar
0 votes
1 answer
724 views

I'm really confused with initialzing C++ classes when usign boost::python. When compiling the follwing code with CMake I get no error, warning or something else at all: #include <boost/python.hpp&...
kaiserm99's user avatar
  • 313

1
2 3 4 5
27