Obfuscated Python Contest Entry

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Thu, 9 Sep 1993 23:40:59 -0400

#!/usr/local/bin/python
#
# Obfuscated Python Contest Entry
# -or-
# How to make your python look more like C.
#
# submitted without comment by:
# Steve Majewski <sdm7g@Virginia.EDU>
#

from sys import stdin,stdout

The_End = '_An_Expected_End_of_Input_'

def err(s):
raise s

def getline():
return( stdin.readline() or err(The_End) )

def echo():
try:
while( stdout.write(getline()) or 1 ) : pass
except The_End:
print The_End

echo()