Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to lock .py file
#2
When you run the code, modules you imported will be extended to pyc files (python compiled). Then you could compile the root file with
>>> import py_compile
>>> py_compile.compile('abc.py')
You can pass these along to clients instead. However there are python uncompilers. Which can reverse this and see the code.

You could build an exe from it with py2exe, pyinstaller, cxfreeze , etc.
However exe's source can be viewable too. Thats how triple AAA games and high end programs get pirated.

Another other option is to obfuscate your code. Or you can write portions in c/c++ and compile it and import it in python.

You can also license it. It will stop tsome folks, but some just wont care.

Python wasnt made to have it code hidden. Its open source and good for open source applications.
https://wiki.python.org/moin/Asking%20fo...%20code%3F
Recommended Tutorials:
Reply


Messages In This Thread
How to lock .py file - by braveYug - Nov-16-2017, 06:47 AM
RE: How to lock .py file - by metulburr - Nov-16-2017, 12:51 PM
RE: How to lock .py file - by braveYug - Nov-16-2017, 01:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Cant find root cause of thread.lock error burlyboys 0 1,578 May-18-2020, 12:51 PM
Last Post: burlyboys
  Read write Lock concerns arvindh 1 2,471 Apr-24-2018, 11:36 PM
Last Post: ODIS
  Brute Force Pad Lock Guesser RedSkeleton007 4 4,021 Mar-03-2018, 07:42 AM
Last Post: RedSkeleton007

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020