Hi there. Here is my implementation i was able to create in 45 min
‘>’ sign is equal to --T (which should mean ‘to file’)
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('files', metavar='file', type=str
, nargs = '*')
parser.add_argument('--T', action='store', required=False)
args = parser.parse_args()
cont = []
for f in args.files:
with open(f,mode='r') as f:
content = f.read()
cont.append(content)
print(content, end='')
if args.T:
with open(args.T, mode='w') as f:
l = ''.join(cont)
f.write(l)
https://github.com/Murtagy you can communicate with me here, if you want! I am going to go through more python tutorial and later develop my Django-crm web-app