I want to create the Windows executable file of my project, but I don't want to share the source code.
I use Linux, but py2exe doesn't work on Linux. Is there a py2exe alternative for Linux?
            Asked
            
        
        
            Active
            
        
            Viewed 1.7k times
        
    3
            
            
         
    
    
        Nicholas Obert
        
- 1,235
- 1
- 13
- 29
 
    
    
        Arjun Jain
        
- 401
- 1
- 8
- 20
- 
                    py2exe doesn't really hide your source code – David Heffernan Apr 19 '11 at 15:58
- 
                    You can't hide your source code. If someone really wants to decompile your program, they'll do it. And Python is *much* easier to decompile than C++ and C, as it's "binaries" are pretty descriptive, so there's really no use in trying to hide the source. Py2exe just packages the generated binaries, so if I can extract your `exe` file, I can decompile your program with ease. – Blender Apr 19 '11 at 16:00
- 
                    @Blender how to hide the sourse code or how to make the trial version of my software . can you provide me the link to any website or book from where i read the complete software development process – Arjun Jain Apr 19 '11 at 16:06
- 
                    You can't. Read this question for more details as to why: http://stackoverflow.com/questions/261638/how-do-i-protect-python-code – Blender Apr 19 '11 at 16:08
- 
                    If that's the question, there are countless duplicates (http://stackoverflow.com/questions/261638/how-do-i-protect-python-code being the most popular canidate) - so, is that the case? – Apr 19 '11 at 16:08
- 
                    It's a mix of that and http://stackoverflow.com/questions/2709925/how-to-make-an-executable-file-in-python. I'm not sure if you can call it a duplicate, but I'll flag it. – Blender Apr 19 '11 at 16:15
- 
                    thanks blender this help alot – Arjun Jain Apr 19 '11 at 16:18
- 
                    See also: http://stackoverflow.com/questions/261638/how-do-i-protect-python-code – Marc Gravell Apr 20 '11 at 10:23
2 Answers
7
            I'd use cx_freeze.
I've tried py2exe, and it doesn't handle dependencies as well as cx_freeze. Best of all, it's cross-platform! I've made Windows and Linux binaries with it, so I can confirm it works properly.
Here's a little tutorial to get you started: http://www.blog.pythonlibrary.org/2010/08/12/a-cx_freeze-tutorial-build-a-binary-series/.
 
    
    
        Blender
        
- 289,723
- 53
- 439
- 496
1
            
            
        Checkout http://www.py2exe.org/
Also look at this question: How to make an executable file in Python?
 
    
    
        Community
        
- 1
- 1
 
    
    
        markmywords
        
- 683
- 5
- 13