#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Manual command line argument handling """ import sys print("Number of arguments:", len(sys.argv), "arguments.") print("Argument List:", str(sys.argv)) if len(sys.argv) < 3: print("To few arguments, please specify a Filename and an Action") sys.exit(1) print(sys.argv[0]) filename = sys.argv[1] action = sys.argv[2] print("Filename:", filename, "Action:", action)