Pyd is a library for the D programming language that wraps the raw Python/C API with a cleaner, simpler interface. It makes exposing raw D functions and classes to Python almost trivially simple. It bears certain similarities to Boost.Python, and indeed Boost.Python is a major influence on Pyd.
Questions tagged [pyd]
91 questions
4
votes
1 answer
implementing iterators in pyd
I am trying to provide python iterator support to a D class wrapped with pyd.wrap_class. According to the documentation (https://github.com/ariovistus/pyd/wiki/ClassWrap#Iterator_wrapping and…

harfel
- 302
- 3
- 14
4
votes
1 answer
Accessing functions from a third party .dll shared library through SWIG and Python
I have from a third party a DLL delivered together with his .lib and .h files (let's say the files are: "test.dll", "test.lib" and "test.h")
This delivered DLL contains some functions that I should access them from a Python script.
For this, I must…

roadx
- 41
- 2
3
votes
3 answers
Python: how to deal with several .pyd dependencies with the same name?
I have in my python workspace two Modules which need sip.pyd
Module1.pyd needs sip.pyd (which implements v 8.0-8.1)
Module2.pyd needs sip.pyd (another file, that implements v6.0)
So I can't just choose the newer one, it doesn't work: I have to keep…

gon2024
- 33
- 4
3
votes
0 answers
How to run Python 2.7 pyd in Python 3
I have a python 2.7 pyd file (= DLL), that I need to run in a python 3 program.
Since it's a pyd, I cannot convert it to python 3 with 2to3.
As of now, I'm running it manually in a separate python console, with an infinite loop waiting for messages…

Sithered
- 481
- 7
- 23
3
votes
1 answer
Windows analogue of Linux nm to see contents of PYD files?
I'd like to see what classes and functions are present in a PYD I have. Are there tools for Windows that let me do that, comparable to how nm on Linux lets me see the symbols defined in .so files?

G. Bach
- 3,869
- 2
- 25
- 46
3
votes
1 answer
Compiling single SciPy module to *.pyd
I'm developing a small tool which uses mainly NumPy and one SciPy module (scipy.optimize.fsolve). My idea of sharing it with others is that it comes in package with Portable Python so that theoretically everyone can run it.
The whole SciPy package…

PythonAdept
- 31
- 3
2
votes
1 answer
port only a single method of class to C?
I have a class with few methods and I'm happy with the performance of all of them except one method. We want to port that to C++. However we don't want to spend too much time porting the whole class to C++, just that single method. Is this possible?…
user975135
2
votes
0 answers
Is there a way to embed the external dll directory with setup.py?
I am building a python extension module from source on Windows using mingw-w64. After a few modifications, the build succeeds. However, I cannot actually import the module due to
ImportError: DLL load failed while importing ...
This is because the…

sqrt6
- 41
- 3
2
votes
1 answer
How to import .pyd file without red line
I can use the pyd file to get a correct answer, but the pyd file never get me the code hinting and there is a red line in pycharm. I don't know how to solve this question.

foolish_boy
- 21
- 1
- 3
2
votes
1 answer
Nuitka: Integration of PYDs into .py and .exe
I have an app that uses PySimpleGUI, Matplotlib and some others (I will refer to them jointly as the 'Modules').
(1) I would like to use better than everage protection (VMProtect is in the list with some others) for my executable (app.exe). To…

User68325794
- 21
- 2
2
votes
0 answers
how to load module from memory, byte code or clean up after load
I have a module in form of byte code - b'fasfasfa', how can I exec() that as when I try I get error ValueError: source code string cannot contain null bytes
Alternatively, how can I import pyd file & delete the file afterwards with module being…

Dariusz
- 960
- 13
- 36
2
votes
2 answers
import C++ module, if fail: import Python version?
I have a Python pyd module written in C++. I also have a Python version of the module (which is much slower).
My question is, as I want the program to run on multiple OSs, can I try to import the C++ version in the program and import the slower…

carlos
- 21
- 1
2
votes
0 answers
Importing any .*pyd fails in my python and throws an import errror: the specified could not be found
I am developing a python project on pyprosail which gives the crop canopy reflectance based on 14 paramaters. The code is already written here.
What I have to do is download pyprosail and import it as a module in my project. But I am facing this…

DIVYA RATHOD
- 229
- 3
- 15
2
votes
1 answer
Issue loading cython cdef functions in a .pyd using LoadLibrary
I'm trying to dynamically load a cythonized .pyd in c++. In a linux machine a .so file is created.
Using a .so I can do the following:
plugin = dlopen("foo.so", RTLD_LAZY);
init = dlsym(plugin, "PyInit_foo); // This works!
cfunc = dlsym(plugin,…

SchatzaM
- 61
- 8
2
votes
0 answers
Libtorrent is downloaded and the Module file exists, pip says it exists, yet I can't import it in Python
I am attempting to add libtorrent to my Python. My issue is that even though I have tried many, albeit odd, workarounds (more on this later) to get libtorrent to work with my Python, I cannot for the life of me import the module.
I'll walk through…

Hoaz
- 77
- 1
- 10