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


Groups > comp.lang.python > #105007

Re: Obfuscating Python code

From Dennis Lee Bieber <wlfraed@ix.netcom.com>
Newsgroups comp.lang.python
Subject Re: Obfuscating Python code
Date 2016-03-16 07:55 -0400
Organization IISS Elusive Unicorn
Message-ID <mailman.193.1458129297.12893.python-list@python.org> (permalink)
References <570f76f8-1e4a-421f-b1ff-4fba72f06a56@googlegroups.com> <mailman.155.1458020722.12893.python-list@python.org> <6849887.F7PvubJjsv@PointedEars.de> <56e9056c$0$1534$c3e8da3$5496439d@news.astraweb.com>

Show all headers | View raw


On Wed, 16 Mar 2016 18:04:10 +1100, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> 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<module>
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/

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


Thread

Is there a way to create a shared object file using PyInstaller? Swanand Pashankar <swanand.pashankar@gmail.com> - 2016-03-14 22:35 -0700
  Obfuscating Python code (was: Is there a way to create a shared object file using PyInstaller?) Ben Finney <ben+python@benfinney.id.au> - 2016-03-15 16:45 +1100
    Re: Obfuscating Python code Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-15 19:59 +0100
      Re: Obfuscating Python code Chris Angelico <rosuav@gmail.com> - 2016-03-16 07:31 +1100
        Re: Obfuscating Python code Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-15 22:51 +0100
          Re: Obfuscating Python code Daniel Wilcox <dmw@yubasolutions.com> - 2016-03-15 23:40 -0700
      Re: Obfuscating Python code Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-03-16 18:04 +1100
        Re: Obfuscating Python code Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2016-03-16 07:55 -0400

csiph-web