As far as my knowledge goes, this is impossible. If you share a python script with other individuals you are entrusting them to not leak any of the source code that you may deem confidential. If you encrypt the source code, then the python's interpreter will not be able to interpret the code (and, therefore, the people you send the encrypted python script will not be able to execute it unless you give them the key--which, in that case, you might as well send it in clear text). No matter what you do, since Python is an interpreted language, you will have to make that script available to them in clear text (regardless of how intricate you try to make the script in order to deter them from viewing it). If you don't mind me asking: what kind of program are you trying to share with them? For example, if you made the application available on the web (and strictly coded the important trade secret algorithms with a server-side language) then they would never come in contact with that source code. Or, although I wouldn't recommend this, you could send them the script coded in a compiled language (and therefore send them the binary)--but beware that there are plenty of really smart people that know how to pick apart binary executables. If you are creating a python script for production that needs to be coded in python, then I would suggest getting a license that makes it illegal for people to copy your code without your consent.