Reputation: 10563
Hi does anyone know if you can compile Python code into a Windows DLL file? How would you go about doing this?
Upvotes: 6
Views: 5182
Reputation: 13553
One way would be to create a C or C++ library that embeds the Python interpreter and runs your Python code.
Another option would be to translate you Python code to C++ with ShedSkin and make that a DLL, although I wouldn't expect a very clean API to come out of this.
Upvotes: 5