Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'yet.': 0.03; 'source,': 0.04; 'subject:Python': 0.05; 'builtin': 0.07; 'executable': 0.07; 'subject:file': 0.07; 'cc:addr:python-list': 0.10; 'python': 0.11; 'python.': 0.11; 'files.': 0.13; 'read.': 0.13; 'wed,': 0.15; 'interpreter': 0.15; 'languages,': 0.15; 'server,': 0.15; '.py': 0.16; 'constitutes': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'unpacked': 0.16; 'wrote:': 0.16; '>>>': 0.20; 'windows': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'trying': 0.22; 'do.': 0.22; 'deployed': 0.22; 'subject: .': 0.22; 'am,': 0.23; 'code.': 0.23; '2015': 0.23; 'seems': 0.24; 'header:In-Reply- To:1': 0.24; 'all.': 0.24; 'question': 0.26; 'linux': 0.26; 'chris': 0.26; 'distribute': 0.27; 'message-id:@mail.gmail.com': 0.28; 'host': 0.28; 'fine': 0.29; 'non': 0.29; 'header,': 0.29; 'obscure': 0.29; 'environment': 0.29; 'themselves': 0.29; 'source': 0.31; 'code': 0.31; 'run': 0.32; "can't": 0.32; 'anyone': 0.32; 'help,': 0.32; 'getting': 0.33; 'common': 0.33; 'instead,': 0.33; 'proposals': 0.33; 'open': 0.33; 'server': 0.34; 'received:google.com': 0.34; 'done': 0.35; 'step': 0.36; 'but': 0.36; 'created': 0.36; 'there': 0.36; 'should': 0.37; 'agree': 0.37; 'subject:: ': 0.37; 'environment.': 0.37; 'mac': 0.37; "won't": 0.38; 'files': 0.38; 'mean': 0.38; 'thank': 0.39; 'pm,': 0.39; 'application': 0.39; 'does': 0.39; 'easily': 0.39; 'some': 0.40; 'easy': 0.60; 'your': 0.60; 'simple': 0.61; "you've": 0.61; 'more': 0.62; 'kindly': 0.64; 'else.': 0.66; 'reverse': 0.66; 'legal': 0.66; 'anyone.': 0.72; 'protect': 0.74; '(open': 0.84; 'actually,': 0.84; 'chrisa': 0.84; 'easier,': 0.84; 'to:none': 0.90; 'reliable,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=Chy12ENaZJCW/Tty8+5G5xsZkO2lLQ8Eex49uKaVIZA=; b=heJQHWAxPopsJ5TFf3+q4vYL3f/ZnwKVgVQqeL65Mfooxe2L2igJYQtDpGV+yj8nBV 4QgEIldyX/Vuvy08s+m0pKi/OAMS+mIRVEoc1ZuoFRQP+aD1TcYpQqGqxIYdurPdsu5z xVyCdIJnmK1LC7uUs29bEwSnVhU40eXOqYfvWdKRT+kFhfh4ap6Qqm1O/uIeylXNY8x+ G0rRN83Embn6Witn911ccfIi3QslUjUcTnzpQ+LxwFNLtXH6OQwCB+clNgqVwbmyfFWb XgUaEuBuxWJzzuAuSBLS+3Z0KrhmqNvBMvlBfstKw3xCF3wIGE9GoLwuTFtGDugewbpD 5mCg== MIME-Version: 1.0 X-Received: by 10.107.134.198 with SMTP id q67mr8139863ioi.27.1434549122596; Wed, 17 Jun 2015 06:52:02 -0700 (PDT) In-Reply-To: References: <349bb66f-bd3c-47ec-bd1d-35f46d23cf95@googlegroups.com> <2219d0b2-24a4-498b-b981-456faf0ceb44@googlegroups.com> <5f6b802f-049b-48e3-b1fd-a5915b7f3dbb@googlegroups.com> <2de8f2c1-5a92-4f8b-be2d-c793de69d463@googlegroups.com> <9e068291-09c2-4b2a-8e1c-8803050cfba1@googlegroups.com> Date: Wed, 17 Jun 2015 23:52:02 +1000 Subject: Re: Creating .exe file in Python From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434549125 news.xs4all.nl 2837 [2001:888:2000:d::a6]:50054 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:92745 On Wed, Jun 17, 2015 at 11:33 PM, hamilton wrote: > On 6/17/2015 7:20 AM, Chris Angelico wrote: >> >> On Wed, Jun 17, 2015 at 11:10 PM, wrote: >>> >>> Thank you all. It seems going fine now. I have one additional question if >>> I run the .exe files created in Non Python Windows environment. Linux has >>> Python builtin but in Non Python environment how may I run it? Is there any >>> set of prequisites I have to follow. I am not finding much web help, if any >>> one may kindly suggest. >>> >> >> There have been some proposals to make an easy way to produce a single >> package that has a Windows executable header, but can be easily >> unpacked and run using a system-provided Linux or Mac OS Python. >> However, I don't think any have been deployed yet. So the simple >> answer is: You can't do what you're trying to do. Instead, take a step >> back, and look at just getting your Python program to run on all >> platforms... and that's easy, just distribute the .py files. Much MUCH >> easier, more reliable, and simpler. >> >> ChrisA >> > Yes, this is easy. > > However, the python source can be read by anyone. > > As a .exe, the source can not be read. > > Just because the interpreter is open source, > does not mean my application should be. Actually, all you've done is obscure your code. This is a very common fallacy; people think that since they cannot themselves read the code out of what they're distributing, nor can anyone else. There's no way to completely stop people from reading your code other than to not give them the code. If you truly want to protect your code from prying eyes, therefore, there's only one way to do it: host it on a server, and let people access the server without seeing the code. This is true of all languages, not just Python, and it's always been the way. You can try to put legal guards around your code ("opening this package constitutes acceptance, blah blah, you agree that you will not reverse engineer, disassemble, blah blah"), but that won't stop people. It's best to either give them the code and let them see it clearly (open source) or keep the code away from them in all forms (server-side deployment). ChrisA