in python,can i load a module from remote server to local? what i do this is want to protect my source code. what should i do ,thanks
1
votes
are you sure this will protect your source code? To be imported it must be read anyway...
- neurino
possible duplicate of Importing module from network
- Ignacio Vazquez-Abrams
You are asking two different questions in one topic, or you are oferring a solution for your question, that both are wrong I think, and makes topic mixed up. (I dont give -1 for that, just a reminder)
- saeedgnu
3 Answers
2
votes
it can be done via python import hooks. see knockout for an implementation that you can either use directly or as a starting point to add further code-protection logic
1
votes
A bit off topic but if source protection is what you need C-compile your python source with cython and distribute .pyd files.
You'll have to:
- adapt your source to be cython compilant (not all code can be converted)
- precompile .pyd files for platforms you want to support (Windows, Ubuntu, Fedora etc...)