(x)
return x
'Type' for argparse - checks that file exists but does not open.
'Type' for argparse - checks that file exists but does not open.
Type for argparse - checks that file exists but does not open .
def extant_file(x):
    """
    'Type' for argparse - checks that file exists but does not open.
    """
    if not os.path.exists(x):
        # Argparse uses the ArgumentTypeError to give a rejection message like:
        # error: argument input: x does not exist
        raise argparse.ArgumentTypeError("{0} does not exist".format(x))
    return x
def extant_file ( x ) : if not os . path . exists ( x ) : # Argparse uses the ArgumentTypeError to give a rejection message like: # error: argument input: x does not exist raise argparse . ArgumentTypeError ( "{0} does not exist" . format ( x ) ) return x