#!/usr/local/bin/python #by D@CC #on 7/2/2021 2021GJul02 import sys # load the system module marker = '#' + ':'*10 + 'textpak=>' # hopefully unique separator (with # for IX) def pack( ): for name in sys.argv[1:]: # for all command-line arguments input = open(name, 'r') # open the next input file print marker + name # write a separator line print input.read( ), # and write the file's contents if __name__ == '__main__': pack( ) # pack files listed on cmdline #Web Source:https://www.oreilly.com/library/view/programming-python-second/0596000855/ch04s05.html #end def textpack_py.py #/textpack_py.py