All pastes #907871 Raw Edit

here iit is.

public python v1 · immutable
·published 2008-02-17 23:09 UTC
rendered paste body
from elementtree.SimpleXMLWriter import encode_entityimport sysif len(sys.argv)<2:    print 'Specify input file'while len(sys.argv)>1:    input=sys.argv.pop()    output=sys.stdout    for line in  open (input,'rb'):        data=encode_entity(line.decode('Latin-1'))        data=data.replace('&#60;','<').replace('&#62;','>')        output.write(data)        output.flush()