Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!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.069 X-Spam-Evidence: '*H*': 0.86; '*S*': 0.00; 'subject:code': 0.07; 'cc:addr:python-list': 0.11; 'python': 0.11; 'suggest': 0.14; 'codebases.': 0.16; 'subject:possible': 0.16; 'subject:python': 0.16; 'sender:addr:gmail.com': 0.17; 'wrote:': 0.18; 'code.': 0.18; 'cc:addr:python.org': 0.22; 'adds': 0.24; 'case.': 0.24; 'of.': 0.24; 'subject: .': 0.24; 'cc:2**0': 0.24; 'source': 0.25; 'task': 0.26; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'compatible': 0.32; 'something': 0.35; 'received:google.com': 0.35; 'largely': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'january': 0.37; 'does': 0.39; 'how': 0.40; 'easy': 0.60; "you're": 0.61; 'offer': 0.62; 'to:addr:gmail.com': 0.65; 'worth': 0.66; 'corporate': 0.67; 'sam': 0.68; 'protect': 0.79; 'compiling': 0.84; 'snatch': 0.84; 'subject:source': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=u7UepMp5TJM7IziRO2L/ofo/gGodmmncr2BtquSGFTQ=; b=MmKYexFxPe1oFFn9dq83kTy1ViYr0mHY2+BrbIqK0c5R7r07TwKaENPWQaPKOWQ2rT 66+hnfFZFax69Ohxr85rwaHj914Baztu42ELKDoLj2I6Vi3naDa9TISCDUCrsY+VWQJc 0ye0fgJM2oKeBSyJjCA9yhIYWFOdyioDDOCCVZZagrkRi/qcJsYI90BlqNay0ltrekw9 deb8F8xP3PRttu8uHEEOhMcHFwr1M2w5Wp6+jrTPOLlSsjAyi2Gj5s1xKoUVACgqMe33 rjxfkM4eZcFzRmPo3aEmzVALSmnxgVKQ6tWIUnBn1dL2MFEpL3SuOrkiHqP5UakWJpzR fHKQ== X-Received: by 10.152.208.197 with SMTP id mg5mr2200671lac.29.1389994318491; Fri, 17 Jan 2014 13:31:58 -0800 (PST) MIME-Version: 1.0 Sender: joshua.landau.ws@gmail.com In-Reply-To: <7bf45fc1-e1c4-44f2-812c-e11ffa2c8ef3@googlegroups.com> References: <7bf45fc1-e1c4-44f2-812c-e11ffa2c8ef3@googlegroups.com> From: Joshua Landau Date: Fri, 17 Jan 2014 21:31:18 +0000 X-Google-Sender-Auth: i-SxtYA1nNs2IT4s9eM8gKL4MF4 Subject: Re: Is it possible to protect python source code by compiling it to .pyc or .pyo? To: Sam Content-Type: text/plain; charset=UTF-8 Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389994326 news.xs4all.nl 2861 [2001:888:2000:d::a6]:60526 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64196 On 17 January 2014 00:58, Sam wrote: > I would like to protect my python source code. It need not be foolproof as long as it adds inconvenience to pirates. > > Is it possible to protect python source code by compiling it to .pyc or .pyo? Does .pyo offer better protection? If you're worried about something akin to corporate espionage or some-such, I don't know of a better way than ShedSkin or Cython. Both of those will be far harder to snatch the source of. Cython will be particularly easy to use as it is largely compatible with Python codebases. I offer no opinions, however, on whether this is a task worth doing. I only suggest you consider the disadvantages and how they apply to your individual case.