I know this is a a very large question but I'll try to make it as simple as possible.
Assuming that my example.py
only holds the following code:
def xsum(a,b):
return a+b
How could I encapsulate this into a dll that would be callable without actually having python installed on the end-user computer. My goal is to use it in VBA.
I looked at py2exe that creates a .exe but I can't find a solution for a dll. any help would be appreciated. I use python 3.6
Cython (http:cython.org) produces C code from python sources. This generated can be compiled into a dll and called from VBA
Read the section "Using Cython Declarations from C" in the documentation
http://www.google.com/search?q="Using+Cython+Declarations+from+C"+site:cython.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With