the real .pyc file

Peter Hansen peter at engcorp.com
Wed Nov 27 00:21:26 EST 2002


Gustavo Niemeyer wrote:
> 
> Yes, I was bored.. ;-)
> 
> int
> a=1//1;main=lambda:1
> +1;
> #define a
> int
> main()
> {a//a:a};import sys;printf=sys.stdout.write
> printf("Hello world!\n");a//a;{
> }

Nice! :-)  I think I can safely say this is the first truly
obfuscated Python code that I've seen.  The funny thing is 
that the obfuscation primarily hides the fact that it even
*is* Python, because you can "of course" tell what it does
just by looking at it (if you know C).

I had to run it to be sure it would even execute as Python.  
(Using a syntax highlighting editor sure helps readability 
though, versus reading it in plain ASCII in Netscape.)

-Peter



More information about the Python-list mailing list