def check_file(option, opt, value):
 if exists(value):
  return value
 msg = 'option %s: file %r does not exist'
 raise OptionValueError((msg % (opt, value)))

def check_file ( option , opt , value ) : if exists ( value ) : return value msg = 'option %s: file %r does not exist' raise OptionValueError ( ( msg % ( opt , value ) ) )
check a file value return the filepath .