Windows installer from python source code without access to source code

jkn jkn_gg at nicorp.f9.co.uk
Fri Mar 31 10:14:42 EDT 2023


On Friday, March 31, 2023 at 1:09:12 PM UTC+1, Chris Angelico wrote:
> On Fri, 31 Mar 2023 at 23:01, Jim Schwartz <jsc... at sbcglobal.net> wrote: 
> > 
> > I want a windows installer to install my application that's written in 
> > python, but I don't want the end user to have access to my source code. 
> > 
> > 
> > 
> > Is that possible using python? I was using cx-freeze, but that has the 
> > source code available. So does pyinstaller. I think gcc does, too. 
> > 
> > 
> > 
> > Does anyone know of a way to do this? 
> >
> Fundamentally no, it's not. Python code will always be distributed as 
> some form of bytecode. The only way to make it available without 
> revealing anything is to put it on a server and let people access it 
> without running it themselves. 
> 
> But why is that a problem? Copyright law protects you from people 
> stealing your code and making unauthorized changes to it, and if 
> you're not worried about them making changes, there's no reason to 
> hide the source code (whatever you distribute would be just as 
> copiable). Are you concerned that people will see your bugs? We all 
> have them. 
> 
> ChrisA

The OP is asking for source code not to be available, not bytecode.
There are obfuscating tools like PyArmor you might want to have a look at.


More information about the Python-list mailing list