Questions tagged [pyd]

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.

91 questions
2
votes
1 answer

SystemError: dynamic module not initialized properly, when import sub module under a sub folder

I have an issue while importing a dynamic python module (pyd), my file structures is as follow: A |--A.py +--B │--B.py │--__init__.py +--Crypto |--__init__.py +--Cipher |--__init__.py |--_AES.pyd A.py: from B…
shawn luo
  • 21
  • 2
2
votes
1 answer

pyd wrap_class example does not compile

I am fairly new to D and try to implement a python wrapper for my first code using the pyd framework. I follow the example code provided at http://svn.dsource.org/projects/pyd/trunk/raw_html/class_wrapping.html but the recipe for wrap_class seems to…
harfel
  • 302
  • 3
  • 14
2
votes
0 answers

How get module interface from *.pyd?

I generated *.pyd file using boost python and copy this file to the C:\Python27\DLLs\ Now I want to get interface module. PyCharm can generate this interface using own tool. Header module's interface: # encoding: utf-8 # module my_module # from…
2
votes
2 answers

ImportError while importing a python file in a pyd

Alright, so, what I'm trying to do is import a module in folders packed inside of a .pyd file. Here is something that would work for me: from apple import __init__ With apple being the .pyd in the same directory as the Python script, and __init__…
billyands55
  • 93
  • 2
  • 7
1
vote
1 answer

How to specify PYD dll dependencies search paths at runtime with python

I created a Python PYD extension module which i can import fine with Python 3.9.1 when i copy all the direct and transitive dll dependencies to the same directory where the PYD file lies. However, whatever i try, i fail at adding the needed search…
ridilculous
  • 624
  • 3
  • 16
1
vote
0 answers

How to point python on dll which should be link against imported extension python module at runtime?

I have an extension python module built with cmake. Module requires third party libutil.dll which linkes against it at runtime. Both module and libutil.dll package into wheel. Are there some ways to help python find libutil.dll for module through…
PazinStep
  • 11
  • 1
1
vote
2 answers

How are .pyd files made from C++ projects?

My current goal is to get this repo, CV-camera-finder, to be compatible with Python 3.10. In the README file, the original publisher says A simple function to find a connected camera list with media foundation. This is just a modified code of a…
Don
  • 11
  • 2
1
vote
0 answers

Python 3.8 DLL Issue - ImportError: DLL load failed while importing _libprojectApiPy38_64: The specified module could not be found

I'm having issues when importing a Python API I'm building. I'm using Swig to wrap C code, then compile it into a pyd library. Everything goes well during the build and I get my pyd library _libprojectApiPy38_64.pyd with no apparent issue. The issue…
pierre_rt
  • 11
  • 1
1
vote
0 answers

Moving dll files and library directories of an exe geenrated by Pyinstaller

I managed to create an .exe file for Windows 10 with PyInstaller from this simple python script: import cv2 print("Hello World!) I also created a hook.py file with this few lines of code: sys.path.append(path) old = os.environ.get('PATH',…
Mak Apple
  • 11
  • 1
1
vote
0 answers

Exclude *.pyd files from go to definition (with ctrl+click)

I have a small problem with my Eclipse IDE PyDev plugin - when I'm developing a program using Python with libraries in *.pyd format, I can't go to definition, because It's binary format. But there are corresponding *.pyi files with source code. How…
KhazAkar
  • 11
  • 2
1
vote
0 answers

boost python set of strings does not match C++ signature error

I'm calling a pyd (.dll) that I created in c++ with boost-python as follows from python: equity = calculator.montecarlo({"3H", "3S"}, {"8S", "4S", "QH", "8C", "4H"}, 2, 10000) but it complains that the signature is just a set but not a set of…
Nickpick
  • 6,163
  • 16
  • 65
  • 116
1
vote
0 answers

How to protect Cython .pyd?

I have the following foo.pyx file which contains a cdef class: cdef class Foo: cdef int test_1(self): ... return 0 cdef int test_2(self): ... return 0 And the corresponding foo.pxd: cdef class Foo: …
Ali Baba
  • 350
  • 1
  • 4
  • 12
1
vote
0 answers

Minimize pyinstaller files for --onedir option

I have been using pyinstaller to "spread" my codes into machines that don't have python 3.x installed, all within the same network. It is a great software, but even after reading the very extensive documentation, I am struggling to simplify the…
miliante
  • 11
  • 2
1
vote
1 answer

Convert .py file into .pyd file

Well after a lot of search unable to find a proper solution, I have my python file 'Main.py'.I want to have its .pyd file i.e Main.pyd. I have tried the way of using Cpython i.e first I have converted 'Main.py' file into 'Main.c'but then unable to…
Nabeel Ayub
  • 1,060
  • 3
  • 15
  • 35
1
vote
0 answers

cl : Command line error D8003 : missing source filename when i compile .py to .pyd with Cython

I get this error when compile hello.py with "python setup.py build_ext --inplace" . I have searched for the error but get nothing. Has anyone ever solved a similar problem? os=win7-64, python=3.6.2, cython=0.27.1, visual stdudio=2015. #…
Hunter
  • 11
  • 3