parser = argparse.ArgumentParser( description='Convert a RAD file to SEG-Y.') parser.add_argument( 'filename', metavar='RAD file', type=str, nargs='*', default='./*.RA[D,1,2]', help= 'The path to one or more RAD files. Uses Unix-style pathname expansion. Omit to find all RAD files in current directory.' ) parser.add_argument( '-o', '--out', metavar='output file', type=str, nargs='?', default='', help= 'The path to an output file. Default: same as input file, but with the nominal frequency and sgy file extension.' ) args = parser.parse_args() Notice.header("This is rad2segy. Stand back.") for f in args.filename: Notice.info("{}".format(f), hold=True) Notice.ok(" >>> ", hold=True) outfile = rad2segy(f, args.out) Notice.info(outfile) Notice.header("Done")