Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dennis Lee Bieber Newsgroups: comp.lang.python Subject: Re: Obfuscating Python code Date: Wed, 16 Mar 2016 07:55:19 -0400 Organization: IISS Elusive Unicorn Lines: 31 Message-ID: References: <570f76f8-1e4a-421f-b1ff-4fba72f06a56@googlegroups.com> <6849887.F7PvubJjsv@PointedEars.de> <56e9056c$0$1534$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de ZuzTnEdl2GDSejDDWXtqQgFMJMnEsQ6wytfQvj058HIw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'executable': 0.07; 'subject:code': 0.07; 'message-id:@4ax.com': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'unexpected': 0.09; 'syntax': 0.13; 'wed,': 0.15; '2016': 0.16; 'chmod': 0.16; 'command,': 0.16; 'flag,': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'shells': 0.16; 'skip:> 20': 0.16; 'url:home': 0.18; 'extension': 0.20; 'work,': 0.21; 'unix/linux': 0.22; "doesn't": 0.26; 'command': 0.26; 'header:X-Complaints- To:1': 0.26; 'error': 0.27; 'windows,': 0.29; 'environment': 0.29; "d'aprano": 0.33; 'steven': 0.33; 'file': 0.34; 'skip:> 10': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'determine': 0.61; 'here:': 0.63; 'mar': 0.65; 'dennis': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: adsl-108-73-119-183.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105007 On Wed, 16 Mar 2016 18:04:10 +1100, Steven D'Aprano declaimed the following: >> (if the “.pyc” file >> is given the executable flag, you can even execute it as a standalone >> command, but that might only work on my system). > >There may be ways to get it to work, but it doesn't work here: > >steve@runes:~$ chmod a+x test.pyc >steve@runes:~$ ./test.pyc >: command not found >./test.pyc: line 2: syntax error near unexpected token `(' >./test.pyc: line 2: `$?Vc @s dGHd S( s > Hello >World!N((((stest.py s' > It likely works on Windows, which uses the file extension and PATHEXT environment to determine "executability" (though I see I don't have .pyc on mine). UNIX/Linux shells looking for a "shebang" line OTOH... -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/