Questions tagged [python-bindings]

86 questions
66
votes
2 answers

Is there a way to perform a mouseover (hover over an element) using Selenium and Python bindings?

Reading here, there apparently used to be a RenderedWebElement class with a hover method. It, however, was exclusively made for Java (I have searched the Python bindings documentation to no avail) and has since been deprecated for Java. A hover…
Ashwin
  • 1,190
  • 2
  • 10
  • 30
18
votes
6 answers

Generate python bindings, what methods/programs to use

I'm looking at using python (CPython) in my program to both allow user scripting in my environment and to allow me to use pyside, the qt bindings for c++ to create the GUI for my application. These can be effectively separated with the idea that the…
ceorron
  • 1,230
  • 1
  • 17
  • 28
8
votes
2 answers

PyPy - SWIG - QuickFix mix

PyPy has some compatibility limitations, especially regarding the CPython C API. I use QuickFix package which comes with precompiled SWIG bindings, and I'm considering using it with PyPy. As I am not fluent in C API and SWIG, my questions are: Does…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
6
votes
2 answers

Can one use Clutter with Python 3?

Are there Python 3 bindings for Clutter? If so, how can I get them and use them?
argentpepper
  • 4,202
  • 3
  • 33
  • 45
6
votes
0 answers

How to bundle external CMake dependencies to generate a Python package?

I am trying to generate Python bindings for the OpenVSlam project. I am using PyBind11 and following the cmake_example template. I successfully build the .so file using pybind11_add_module in my development environment, in which I have all…
josealeixo.pc
  • 391
  • 3
  • 13
6
votes
3 answers

Cython bytes to C char*

I am trying to write a Cython extension to CPython to wrap the mcrypt library, so that I can use it with Python 3. However, I am running into a problem where I segfault while trying to use one of the mcrypt APIs. The code that is failing is: def…
Michael Trausch
  • 3,187
  • 1
  • 21
  • 29
6
votes
2 answers

Parsing User Defined Types Using PyArg_ParseTuple

How to parse userdefined types (or types from an existing non-standard library) using PyArg_ParseTuple?
dhanesh sr
  • 121
  • 6
6
votes
1 answer

Holding python-produced value in a C++ static boost::shared_ptr

While playing with Boost.Python and C++, sometimes we create classes that are bound using the class itself and a boost::shared_ptr<> version. This is very convenient for many reasons and can be used in lots of places. However, the mechanism does not…
André Anjos
  • 4,641
  • 2
  • 27
  • 34
5
votes
0 answers

RPATH propagation failing for Python bindings

I am building a library (Ubuntu 22) that uses onnxruntime under the hood. In turn, onnxruntime uses CUDA, dynamically loading some dedicated "backend". I build the whole code stack except the CUDA libraries, and none of the libraries have their…
ajc
  • 365
  • 2
  • 18
5
votes
1 answer

How to add a python binding to C#?

When you want to call C from python, you write a module like this: http://docs.python.org/extending/extending.html Now, I have a question: I want to write a module for use in Python with C#. How can I get C# to interact with native Python ? (Note:…
Stefan Steiger
  • 78,642
  • 66
  • 377
  • 442
5
votes
1 answer

Does Boost.Python need binding code for other boost libraries?

I have a class that inherits from boost::statechart library. I need to use this class in Python script, I am wondering if I need to write wrapper codes (.def s) for all boost::statechart library just because my class inherited from it? Or the…
4
votes
1 answer

How can you bind exceptions with custom fields and constructors in pybind11 and still have them function as python exception?

This appears to be a known limitation in pybind11. I read through all the docs, whatever bug reports seemed applicable, and everything I could find in the pybind11 gitter. I have a custom exception class in c++ that contains custom constructors and…
Jesse C
  • 779
  • 4
  • 11
4
votes
2 answers

is it possible to release the GIL before a C function that blocks and might call back into Python?

I am wrapping a C function which performs a blocking operation (select) and then handles incoming messages. My understanding is that when a C function is going to block, the correct way to call it while allowing other threads to run…
Steve
  • 8,153
  • 9
  • 44
  • 91
4
votes
1 answer

"writing a python binding" vs "using command-line directly"

I have a question regarding python bindings. I have a command-line which exposes some functionality and code is re-factored to provide the functionality through a shared library. I wanted to know what the real advantage that I get from "writing a…
4
votes
3 answers

Why are Python bindings developed for existing code in other languages such as C?

What is the motive behind developing Python bindings for existing code in other languages? I see many programmers developing Python bindings for their existing C code. Why? How does it help?
N mol
  • 571
  • 1
  • 8
  • 19
1
2 3 4 5 6