def validate_readable(option, value):
 if (value is None):
  return value
 value = validate_string(option, value)
 open(value, 'r').close()
 return value

def validate_readable ( option , value ) : if ( value is None ) : return value value = validate_string ( option , value ) open ( value , 'r' ) . close ( ) return value
validates that value is file-like and readable .