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


Groups > comp.lang.python > #78467

Re: Obscuring Python source from end users

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'interpreter': 0.05; 'url:pipermail': 0.05; 'subject:Python': 0.06; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'unpacking': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; 'driver': 0.24; 'file.': 0.24; 'script': 0.25; 'compiled': 0.26; 'distribute': 0.26; 'excel': 0.26; 'header:X-Complaints-To:1': 0.27; 'possibility': 0.29; 'code': 0.31; 'that.': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'subject:end': 0.31; 'subject:users': 0.31; 'file': 0.32; 'option': 0.32; 'another': 0.32; 'url:python': 0.33; 'subject:from': 0.34; 'but': 0.35; 'possible': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'files': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; 'url:mail': 0.40; 'here:': 0.62; 'such': 0.63; 'zip': 0.64; 'subject:source': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Sturla Molden <sturla.molden@gmail.com>
Subject Re: Obscuring Python source from end users
Date Mon, 29 Sep 2014 14:51:33 +0000 (UTC)
References <89381545-5edc-4f85-a4b8-86eebfdf34ee@googlegroups.com> <542946ec$0$12998$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host 60-109-11.connect.netcom.no
User-Agent NewsTap/4.0.1 (iPad)
X-
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.14472.1412002310.18130.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1412002310 news.xs4all.nl 2909 [2001:888:2000:d::a6]:60078
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:78467

Show key headers only | View raw


Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:

> Another possibility is to distribute your modules inside a zip file. See
> here:
> 
> https://mail.python.org/pipermail/python-list/2014-July/675506.html
> 
> Such zip files are not just runnable, but also importable. Depending on your
> Excel requirements, you might need a tiny driver script as above.

It should also be possible to temper with the zipimport module to allow a
'scrambled' zip file. That makes it harder for users to access the code by
unpacking the zip file.

py2exe will collect pyc files into a single zip file and import that. It
does not need a driver script because it embeds the Python interpreter in
an executable. 

Yet another option is to compile the Python code with Cython and distribute
everything as compiled pyd files.

Sturla

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


Thread

Obscuring Python source from end users norman.ives@gmail.com - 2014-09-29 00:36 -0700
  Re: Obscuring Python source from end users Chris Angelico <rosuav@gmail.com> - 2014-09-29 17:52 +1000
    Re: Obscuring Python source from end users norman.ives@gmail.com - 2014-09-29 01:41 -0700
      Re: Obscuring Python source from end users Chris Angelico <rosuav@gmail.com> - 2014-09-29 18:55 +1000
      Re: Obscuring Python source from end users Chris Angelico <rosuav@gmail.com> - 2014-09-29 20:14 +1000
  Re: Obscuring Python source from end users alister <alister.nospam.ware@ntlworld.com> - 2014-09-29 08:42 +0000
  Re: Obscuring Python source from end users Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-09-29 21:47 +1000
    Re: Obscuring Python source from end users Sturla Molden <sturla.molden@gmail.com> - 2014-09-29 14:51 +0000
    Re: Obscuring Python source from end users Dan Stromberg <drsalists@gmail.com> - 2014-10-01 15:06 -0700
      Re: Obscuring Python source from end users Marko Rauhamaa <marko@pacujo.net> - 2014-10-02 08:17 +0300
        Re: Obscuring Python source from end users Terry Reedy <tjreedy@udel.edu> - 2014-10-02 03:19 -0400
        Re: Obscuring Python source from end users Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-02 17:22 +1000
  Re: Obscuring Python source from end users Sturla Molden <sturla.molden@gmail.com> - 2014-09-29 14:53 +0000
    Re: Obscuring Python source from end users Johannes Bauer <dfnsonfsduifb@gmx.de> - 2014-10-02 09:50 +0200
      Re: Obscuring Python source from end users Chris Angelico <rosuav@gmail.com> - 2014-10-02 18:32 +1000

csiph-web