def get_arguments():
 parser = argparse.ArgumentParser()
 parser.add_argument('-i', '--input_file', required=True, help='csv input file (with extension)', type=str)
 parser.add_argument('-o', '--output_file', required=True, help='csv output file (without extension)', type=str)
 parser.add_argument('-r', '--row_limit', required=True, help='row limit to split csv at', type=int)
 args = parser.parse_args()
 is_valid_file(parser, args.input_file)
 is_valid_csv(parser, args.input_file, args.row_limit)
 return (args.input_file, args.output_file, args.row_limit)

def get_arguments ( ) : parser = argparse . ArgumentParser ( ) parser . add_argument ( '-i' , '--input_file' , required = True , help = 'csv input file (with extension)' , type = str ) parser . add_argument ( '-o' , '--output_file' , required = True , help = 'csv output file (without extension)' , type = str ) parser . add_argument ( '-r' , '--row_limit' , required = True , help = 'row limit to split csv at' , type = int ) args = parser . parse_args ( ) is_valid_file ( parser , args . input_file ) is_valid_csv ( parser , args . input_file , args . row_limit ) return ( args . input_file , args . output_file , args . row_limit )
grab user supplied arguments using the argparse library .