Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90044

Re: Encrypt python files

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <fomcl@yahoo.com>
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; 'scripts': 0.03; 'interpreter': 0.05; 'binary': 0.07; 'wednesday,': 0.07; 'cest': 0.09; 'code"': 0.09; 'feature.': 0.09; 'hiding': 0.09; 'must,': 0.09; 'subject:files': 0.09; 'python': 0.11; 'language.': 0.14; '.py': 0.16; '>on': 0.16; 'code?': 0.16; 'dictionary).': 0.16; 'format?': 0.16; 'marshalled': 0.16; 'readable': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; 'wary': 0.16; 'windows?': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'trying': 0.19; 'code,': 0.22; 'wednesday': 0.24; 'header:Received:8': 0.24; 'software.': 0.24; 'source': 0.25; 'developers': 0.25; 'compiled': 0.26; 'distribute': 0.26; 'to:2**1': 0.27; 'to:no real name:2**1': 0.29; 'waste': 0.30; 'code': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; 'service,': 0.32; 'option': 0.32; 'open': 0.33; 'running': 0.33; "can't": 0.35; 'no,': 0.35; 'operate': 0.35; 'but': 0.35; 'there': 0.35; 'version': 0.36; 'limitations': 0.36; 'charset:us-ascii': 0.36; 'hi,': 0.36; 'application': 0.37; 'skip:- 20': 0.37; 'others.': 0.38; 'security,': 0.38; 'to:addr :python-list': 0.38; 'files': 0.38; 'rather': 0.38; 'to:addr:python.org': 0.39; 'users': 0.40; 'how': 0.40; 'received:67.195': 0.60; 'received:98.137': 0.60; 'free,': 0.61; 'viruses': 0.61; 'soon': 0.63; 'received:gq1.yahoo.com': 0.68; 'received:mail.gq1.yahoo.com': 0.68; '(incl.': 0.84; '2015': 0.84; 'ashamed': 0.84; 'received:bullet.mail.gq1.yahoo.com': 0.84; 'worms': 0.84; 'absolutely': 0.87; 'besides,': 0.93
X-Yahoo-Newman-Property ymail-4
X-Yahoo-Newman-Id 240413.85269.bm@omp1023.mail.gq1.yahoo.com
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1430905557; bh=n+JDkQ9hkttFVKvFIsc2shyoilfzTBqIeHEjX5Jx93k=; h=Message-ID:Date:From:Subject:To:MIME-Version:Content-Type; b=JrJYXb+0bCyTQg7iQfrg4yAP94m0XirlFhDBaIjKbp5DKWfgk3qo6PAFM8d/thHal6Ig+eUQyEqRePmB05znnS8vUn2DGDBFk4PcXnIzumPkR50Z+UvNRuEMOe9xAd8rN0awMzw417eBvHFj55sZS1nqESiCWiHcSQUDsKPYLPQ=
X-YMail-OSG PkTUoWoVM1k5aU0vtzP.RucdhmOQ_qd223s6W2MUwIA8eRG 449Lx6kRLr5njwWG8zkrgK7grDOkWOEw_RYzRwqw6WivZ5EMwjAQvxWUaSXW 9Zee7qjEwF0V0CE_vwPIX2FsQIGOcsTOxmuQnfsK4SZNYJG_2V00WJrCWCxX 6VK8rvD7tcUAnuvO7OwCiCRGmjW6CqNzK_RbzB21iSbkL_2QgaAR6CL2GWRb 6Zs5pokt9lDBwRtt2_AuibtItGfTD8RoQ3g7B3Cb3BMSywg6gLeaFsUiHNsK 8F3E1RIDjOdBA11OtEgNsG_Ge4rsZhobiwOgm_hUrgH8DTztqVCInz3ax9pF W0QR7zp9UPyx0MuNcy54nVBJVSZoaRO5y9ER.Bgv6D5_5rcdCnmzY07izoKu Z14KyQaY2CiP_tpTQgCIRiVFjYlQXj6rxr0EnYsoZhGieJlhHN6zQ.m5QiU9 WJpzRE4qnJxnacU9xEtYHsyFwMVapk6DaXEmSTpVUk7ccbUJc.Cm3u.SPdX. AaXY1SvxG2OtuoOrBuB9WyLDI_gDcrMUNmCg2IqZehXnsYktoX14dcfibW1X BtQ--
X-Rocket-MIMEInfo 002.001, Ci0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQpPbiBXZWQsIE1heSA2LCAyMDE1IDExOjA0IEFNIENFU1QgU3RldmVuIEQnQXByYW5vIHdyb3RlOg0KDQo.T24gV2VkbmVzZGF5IDA2IE1heSAyMDE1IDE3OjIzLCBQYWxwYW5kaSB3cm90ZToNCj4NCj4.IE9uIFdlZG5lc2RheSwgTWF5IDYsIDIwMTUgYXQgMTI6MDc6MTMgUE0gVVRDKzU6MzAsIFBhbHBhbmRpIHdyb3RlOg0KPj4gSGksDQo.PiANCj4.IFdoYXQgYXJlIHRoZSB3YXlzIHRvIGVuY3J5cHQgcHl0aG9uIGZpbGVzPw0KPj4gDQo.PiBObywgSSABMAEBAQE-
X-Mailer YahooMailWebService/0.8.203.740
Date Wed, 6 May 2015 02:45:57 -0700
From Albert-Jan Roskam <fomcl@yahoo.com>
Subject Re: Encrypt python files
To steve+comp.lang.python@pearwood.info, python-list@python.org
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.166.1430905888.12865.python-list@python.org> (permalink)
Lines 37
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1430905888 news.xs4all.nl 2910 [2001:888:2000:d::a6]:49586
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90044

Show key headers only | View raw


-----------------------------
On Wed, May 6, 2015 11:04 AM CEST Steven D'Aprano wrote:

>On Wednesday 06 May 2015 17:23, Palpandi wrote:
>
>> On Wednesday, May 6, 2015 at 12:07:13 PM UTC+5:30, Palpandi wrote:
>> Hi,
>> 
>> What are the ways to encrypt python files?
>> 
>> No, I just want to hide the scripts from others.
>
>Why, are you ashamed of your code?
>
>Python is free, open source software. Hiding the code from others is not a 
>priority for the developers of the language. Besides, you can't hide the 
>code unless you only operate the application via a web service, or similar. 
>As soon as you give people a copy of the code, whether it is binary code or 
>source code, they have a copy of it and can look at it and work out how what 
>it does.
>
>If "hiding the code" was good for security, why are there so many viruses 
>and spybots and worms and other malware for Windows?
>
>No, as far as I am concerned, trying to hide the code is a waste of time 
>with Python. But if you absolutely must, you can distribute the .pyc files 
>instead of the .py files, and that will discourage casual tinkerers from 
>poking around in the program. The .pyc file is compiled to byte-code rather 
>than source code, so it's not readable without running it through a 
>decompiler.

I used the marshal module before as a faster alternative to shelve (I marshalled a huge dictionary). I always understood marshal files require the *exact* same interpreter version (incl. built number). Do the same limitations apply for .pyc files? Isn't it the same format?

We have a VCS with an option to use private repos. I am always wary of users who want to use this feature. Why would you not want to share your code with your colleagues? Embarrassed about unreadable crappy code, perhaps?  

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Encrypt python files Albert-Jan Roskam <fomcl@yahoo.com> - 2015-05-06 02:45 -0700
  Re: Encrypt python files Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-06 21:50 +1000

csiph-web