Codingassignmenthelper | Home Codingassignmenthelper | University

Code

Assignment Code :


import sys
import argparse
# The code below configures the argparse module for use with
# assignment #2.
#

def main():
 parser = argparse.ArgumentParser()
 parser.add_argument('--file', type=str, help='file to be processed')
 parser.add_argument('--start', type=str, help='start of date range')
 parser.add_argument('--end', type=str, help='end of data range')

 args = parser.parse_args()

 print ('file: {}; start: {}; end: {}'.format( args.file, args.start,args.end))

 if not args.file:
  print("Need --file= > ics filename < ")

 if not args.start:
  print("Need --start=dd/mm/yyyy")

 if not args.end:
  print("Need --end=dd/mm/yyyy")

 if __name__ == "__main__":
  main()

To Download Click Here > code.pdf
Codingassignmenthelper | Home Codingassignmenthelper | Home