Python Forum

Full Version: Python to .so library in Ubuntu for web server
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi - In my project are trying to use python code in a web server. However for various reasons we are not allowed to actually put the python code on the web server itself. The idea that came up is to compile the python code into a shared library that the c++ web server code can call when requested.
To that end, is there a way to compile a python code/project into C++ shared object (.so)? This means providing an "h-file" as well.
If someone knows and could shed light on this, I'd be most grateful :)
Additionally if someone has an additional suggestion other than to compile to a .so - I'd be interested in alternatives as well.

Thanks,
Jeff