* Florian Weimer:
sys.stdout.write("\# %i " % (l + (l + 255) / 256))
This has line has to read: sys.stdout.write("\# %i " % (l + (l + 254) / 255)) There might be other bugs. Caveat emptor.