Questions tagged [python-bindings]

86 questions
1
vote
1 answer

Python binding of functions within a c++ program

I have a program written in c++ that functions on it's own, however we want to make it accessible to Python. Specifically, we have several functions that are more efficient in c++, but we do a lot of other things with the output using Python…
Kari
  • 21
  • 4
1
vote
0 answers

Update Python bindings cv2.so after changing opencv source

I have modified the opencv cascade classifier's source code for object detection to incorporate new functionality. I made changes to the source code of opencv_createsamples and opencv_traincascade which are responsible for training the classifier.…
1
vote
1 answer

Cythonic way to wrap boost::geometry::Point accessors

What is the correct cythonic way to wrap the following member functions of a boost::geometry::Point? The code snippet comes from here. /// @brief Get a coordinate /// @tparam K coordinate to get /// @return the coordinate template…
gmas80
  • 1,218
  • 1
  • 14
  • 44
1
vote
1 answer

"You need version 1.5.0 or better of the Subversion Python bindings" using mailer.py

I'm trying to send emails when a user locks/unlocks elements in a SVN repository through a hook using the Apache Mailer script (mailer.py). When the suitable hook is executed I'm obtaining the following error: You need version 1.5.0 or better of…
1
vote
0 answers

Error when running PyInstaller binary "Fatal Python error: PyThreadState_Get: no current thread"

I am quite new to python and have question about pyinstaller What I have: Python script that imports dynamic library written in C++ (using boost python) If I run this script using python everything works fine python main.py startup If I create…
Georgy Buranov
  • 1,296
  • 1
  • 16
  • 26
1
vote
3 answers

Threaded python and C binding synchronization

I am working on implementing Python bindings for a real-time C library of mine. I have read that threads in Python are not actual threads and that they don't really run in parallel (because of the Global Interpreter Lock). Nevertheless, I would have…
Shahbaz
  • 46,337
  • 19
  • 116
  • 182
0
votes
1 answer

In Python - Selenium2 how to set the time for which a webdriver instance should wait,when loading a page,before giving a timeout exception?

I tried it by instantiating a webdriver using the time out as the third parameter as shown below: self.driver = webdriver.Firefox(None, None, 5) and then used the driver to fetch a web page like so self.driver.get("http://www.google.com") However…
Ashwin
  • 1,190
  • 2
  • 10
  • 30
0
votes
0 answers

Linking error using boost-python library macOS m2

My hardware and software configuration is as follows: macOS Ventura version 13.4.1 M2 Max chip python version 3.11.4 (Versions managed by pyenv) boost 1.82.0_1 (installed with Brew) boost-python 1.82.0 (installed with Brew) I am trying to extend…
Eyan
  • 3
  • 2
0
votes
0 answers

How to resolve linker errors when trying to install python bindings with setuptools?

I am currently trying to install python bindings for a project build in Rust (https://github.com/bet4it/udbserver). Building the project itself works fine and I get a .dll, .h and .lib file. Since I am on Windows I can not just put them into usr\bin…
0
votes
1 answer

Initializing std::map of pointers of objects in cppyy

I am trying to initialize a map from strings to unique pointers from cppyy. I am able to make a vector of pointers without issue, but I get some complaints from cppyy when I make a map. Here are my classes: import cppyy import cppyy.gbl as…
shouriha
  • 79
  • 6
0
votes
0 answers

Cppyy map of subclassed or templated objects

As a follow-up question to Using cppyy with rvalue pointers and maps (Apologies for not coming up with a simpler example) I am attempted to initialize a NameToBasisModel(std::map>>&&…
shouriha
  • 79
  • 6
0
votes
1 answer

How to use pybind11 to call hpx async function in recursive python code?

So , what I want to do is to call this async function in the recursive function in python . But it is not working and I dont have idea why it shouldn't . This is my binding for async function in hpx and trying to use in recursive function in…
0
votes
0 answers

Calling async thread from pythonBinding

I have a python based application and it calls the below .cpp code through pythonBinding. while(1) { auto statusResponse = _mProxy->GetStatusAsync( nodeKey, std::bind(&NodeIfaceImpl::getStatusDbusCallback, this, …
deepan muthusamy
  • 321
  • 2
  • 14
0
votes
1 answer

Creating Python bindings for CPP code and then importing it into a Python script

I'm trying to make Python bindings for some C++ code that I created using an existing C++ library. I'm using PyBind11 and CMake to build the bindings and convert them into a shared library (.so) that I can import directly into my Python script.…
0
votes
1 answer

indings: python bindings disabled due to the following missing dependencies: cppyy

I want to install PyViz visualizer in ns3.37 but I am getting this error in MacOS Ventura version 13.2.1 EXPECTED OUTPUT SHOULD BE : PyViz visualizer : ON Python Bindings : ON BECAUSE PyViz is dependent on Python Bindings