Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78566
| References | <89381545-5edc-4f85-a4b8-86eebfdf34ee@googlegroups.com> <542946ec$0$12998$c3e8da3$5496439d@news.astraweb.com> |
|---|---|
| Date | 2014-10-01 15:06 -0700 |
| Subject | Re: Obscuring Python source from end users |
| From | Dan Stromberg <drsalists@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14531.1412201168.18130.python-list@python.org> (permalink) |
On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote: > norman.ives@gmail.com wrote: > >> Hello list >> >> Python 3.4 applies. >> >> I have a project that involves distributing Python code to users in an >> organisation. Users do not interact directly with the Python code; they >> only know this project as an Excel add-in. >> >> Now, internal audit takes exception in some cases if users are able to see >> the source code. > > You have my sympathy. Actually, I don't think this is that bad. Companies have rules; one simply has to learn to live with this or suffer greatly. Some rules are worth fighting, but this probably isn't one of them. >> So I'm wondering if anyone has clever suggestions in this regard... > > Yes. Distribute the pyc files only. Yes, this is the way it's usually done. Supposedly Microsoft did this for a while, after acquiring some Python software. In the Python 3.4 case, the pyc's should be in the __pycache__ subdirectory. Another option would be to convert to Cython and compile (not as bad as it sounds). But __pycache__/*.pyc would probably be easier.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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