Advertisement
Guest User

Untitled

a guest
Jul 11th, 2011
79
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. lines = [open(f, 'r').readlines() for f in sys.argv[1:]]
  3. lens = [max([len(unicode(x.strip(), 'utf8')) for x in y]) for y in lines]
  4. for i in range(max([len(l) for l in lines])):
  5.     print ("%%-%ss %%-%ss %%-%ss" % tuple(lens)) % tuple([(l[i].strip() if i < len(l) else '') for l in lines])
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement