#NEWLINE# def path_check( path ) : #NEWLINE# #INDENT# path = os . path . abspath ( path ) #NEWLINE# fdir = os . path . dirname ( path ) #NEWLINE# if os . path . isdir ( fdir ) : #NEWLINE# #INDENT# return path #NEWLINE# #UNINDENT# msg = '"{0}" is not a valid file path.' . format ( msg ) #NEWLINE# raise argparse . ArgumentTypeError ( msg )