Ian Bicking: the old part of his blog

Comment

Nice.

I had to do this to get it to work though: note that whitespaceO.py is the original file.


--- whitespace.py Fri Oct 22 21:25:38 2004
+++ whitespaceO.py Fri Oct 22 21:24:32 2004
@@ -40,7 +40,7 @@

def enc_stream(input, output):
while 1:
- s = input.readline()
+ s = input.input.read(4096)
if not s:
break
for c in s:
@@ -49,7 +49,7 @@
def dec_stream(input, output):
s = ''
while 1:
- data = input.readline()
+ data = input.read(36)
if not data:
break
s += data
@@ -81,7 +81,7 @@
if args[1:]:
input = open(args[1])
if args[2:]:
- output = open(args[2], 'w')
+ input = open(args[2], 'w')
if use_repr:
stream_output = StringIO()
else:
Comment on Even more significant whitespace
by KAB