L
L
LeKot2010-12-14 22:35:41
Python
LeKot, 2010-12-14 22:35:41

It is necessary to make a dll in python. Where to read?

Is it possible to make a dll library from a py script, if so, where can I read about it?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
J
JeanLouis, 2010-12-14
@JeanLouis

For example, here in this article it is written how to get a dll from a py file, see the subtitle "Setting up IIS7":

M
MikhailEdoshin, 2010-12-15
@MikhailEdoshin

There is no easy way, but you can write a C wrapper that loads the module and exports the functions you need. A module can be stored as source code right in the code. To work in the general case, you will need an installed Python, or at least PythonNN.dll, and the necessary modules from the standard library (also built into the code). There is a py2exe utility that makes an .exe file in approximately the same way.

B
bagyr, 2010-12-15
@bagyr

Google about cython and pyd files
stackoverflow.com/questions/4083150/using-cython-to-expose-functionality-to-another-application
www.python-forum.org/pythonforum/viewtopic.php?f=15&t=11224 Not
myself tried.

M
MikhailEdoshin, 2010-12-16
@MikhailEdoshin

And here's another note, by the way, Implementing dynamic DLLs in Python ; as you can see from the note, there is no ready-made solution, although it seems to be technically possible to write one template, which then “simply” would receive a list of functions and make a DLL out of this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question