#!/usr/bin/python # TYPE:default # DESC:Recreation of the Unix "tac" utility, which reads files backwards. from sys import argv for arg in argv[1:]: file = open(arg).readlines() file.reverse() print "\nFile '%s':\n" % (arg) for line in file: print line.strip('\n') print '\n'+'-'*20