Can human-readable source code be recovered from a py2exe executable? [duplicate]

StackOverflow https://stackoverflow.com/questions/20421825

  •  29-08-2022
  •  | 
  •  

문제

I would like to distribute a .exe program that I made with Python and py2exe. My program may be commercial (not sure). If so, I don't want people to recover easily the sourcecode. (Of course reverse engineering or complex decompiling can always be done, but...)

So : is it possible to recover the original sourecode from an executable produced by py2exe?

도움이 되었습니까?

해결책

Yes, trivially. Py2exe just creates a zip of the .pyc files with an executable wrapper, and those files are easily uncompilable with eg uncompyle.

The way to sell commercial software in Python is not to worry about whether people can see the code, but to license it appropriately.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top