Questions tagged [python-bindings]

86 questions
2
votes
1 answer

HTML to PDF with python and wkhtmltopdf

I have just found wkhtmltopdf, amazing html converter using webkit. I have tried it on my dev machine and its simple and works well. How can this best be integrated with a django based site? I found the python bindings, but they presume a certain…
Robert Johnstone
  • 5,431
  • 12
  • 58
  • 88
1
vote
2 answers

Quickfix - Set sequence number in Python

I use the Python bindings that come with Quickfix and I'd like to set the sequence number through it (see why). How can I do this? I found the following in the SWIG bindings: class Session(_object): # ... def setNextSenderMsgSeqNum(self,…
Jonathan Livni
  • 101,334
  • 104
  • 266
  • 359
1
vote
1 answer

Embedded a #[pyclass] in another #[pyclass]

I am trying to implement a cache for the private variable of any python class. Let's suppose I have this: #[pyclass] struct ClassA { pv: Py, // GIL independent type, storable in another #[pyclass] field_a:…
Jim
  • 450
  • 2
  • 10
1
vote
0 answers

How to convert c++ std::map to python type using pythonBinding

I have a C++ library that needs to be used with a Python application. I have created a pythonBinding for that library. header.h enum class enumA { app1, app2, app3}; enum class enumB { kInit, kRunning, …
deepan muthusamy
  • 321
  • 2
  • 14
1
vote
0 answers

pyo3: Passing a reference of Rust's Self into a method of Self with attribute `#[classmethod]`

Context of my question: In pydantic's, you can define a CustomType, which is any python class with the following class method named __get_validators__(cls) defined. The objective is to have pydantic validate the input to the initialization of the…
Jim
  • 450
  • 2
  • 10
1
vote
1 answer

What is the alternative for CollabNet's python svn bindings?

What is the alternative for the python svn bindings provided by CollabNet (this where you have 2 directories: svn and libsvn, the second with a lot of pre-compiled libraries)? The problem with it is that it just can't be configured to run with…
FolksLord
  • 992
  • 2
  • 9
  • 17
1
vote
0 answers

Gstreamer python bindings installation

Im tring to install python binding for gstreamer. I have followed these steps. git clone https://github.com/GStreamer/gst-python.git cd gst-python GSTREAMER_VERSION=$(gst-launch-1.0 --version | grep version | tr -s ' ' '\n' | tail -1) git checkout…
Prithvi Raj
  • 1,611
  • 1
  • 14
  • 33
1
vote
0 answers

How should I communicate bytes to Python using pyo3?

I am new to Rust, and I am writing a library that creates background threads that listen and handle TCP communications. I want to store the latest n bytes for every TCP client and have Python to be able to fetch them. The way I am thinking about…
1
vote
0 answers

How to make VSCode Intellisense work with Python bindings of C++ code?

I am using a library called GTSAM written in C++ that has a nice Python wrapper made with pybind11. However, VSCode's Intellisense auto-complete feature doesn't seem to work with this module, i.e. it is unable to give suggestions and cannot…
1
vote
1 answer

What is the difference between different pybind11's type conversion options?

I have a project where i am mixing cpp and python code. For multiple reasons, the frontend needs to be in python and the backend in cpp. now, i am looking for a solution as for how to pass my python object to cpp. one think to note is the fact that…
1
vote
1 answer

Pyinstaller adddata query

When I am trying to converting my python file into executable and binding with pdf with using command add-data. My pdf file is store no where due to this I cannot open my pdf file while opening executable.(yes, but command will create executable…
1
vote
1 answer

HFST, python setup

I am building a morphological parser with hfst, but am running into problems with installation. I have successfully downloaded the hfst package, and it is present in the site-packages directory of my python framework. I can import it in python…
1
vote
1 answer

xmlStrEqual when import igraph.Graph - linking libxml2

I am trying to import igraph.Graph from the python-igraph(0.7.1.post6) package using python 3.5.0 on Ubuntu 16.04.1 LT but get an error: from igraph._igraph import * ImportError:…
Silian Rails
  • 897
  • 1
  • 8
  • 14
1
vote
1 answer

Using GLFW in Python on Windows

Is there an easy way to use GLFW in python? I have tried installing pyglfw and wasn't able to import the modules inside of the pyglfw package. I also tried installing glfw, but got the following error while trying to import it: ImportError: Failed…
Connor
  • 193
  • 1
  • 11
1
vote
1 answer

OpenCV Python bindings for cv::ml::SVM::trainAuto

I want to estimate the optimal C and gamma parameters for my SVM training in OpenCV. If I understand the master (3.1-dev) docs correctly cv::ml::SVM::trainAuto would be fit perfect for my needs (using cross-validation to estimate the perfect…
Fabian
  • 3,139
  • 2
  • 23
  • 49