ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There's a python tool called "Freeze" out there. I've never used it, only heard references to it, but I think it does what you're looking for. Keep in mind that python was not intended to build executables, it was designed as a scripting language, so YMMV.
thanks for reply. I just wondered that if I can use python for devoloping some software for industrial plants...and keping the source code to my self...
Originally posted by charnel
I just wondered that if I can use python for devoloping some software for industrial plants...and keping the source code to my self...
You could distribute only "compiled" python files (.pyc or .pyo). It's not impossible to figure out the internals of your program, but it makes it difficult to do so.
# It is possible to have a file called spam.pyc (or spam.pyo when -O is used) without a file spam.py for the same module. This can be used to distribute a library of Python code in a form that is moderately hard to reverse engineer.
# The module compileall can create .pyc files (or .pyo files when -O is used) for all modules in a directory.
And, of course, anything can be reverse engineered. I mean, you can convert binarys to assembly language and hack at that, and there are decompilers for virtually every language. It's just a matter of how hard you're going to make it for them.
If this is being done for a company, why are you not providing them with the source? (Unless it's contract work, in which case you should be able to get away with a strong license: companies do try to stay on the legal side of things)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.