CPEComponent2_3_WFN class

class cpe.comp.cpecomp2_3_wfn.CPEComponent2_3_WFN(comp_str, comp_att)[source]

Represents a component of version 2.3 of CPE specification with WFN style.

SEPARATOR_COMP = ', '

Separator of components of CPE name with URI style

SEPARATOR_LANG = '\\-'

Separator of language parts: language and region

SEPARATOR_PAIR = '='

Separator of attribute and value in pairs of component

VALUE_ANY = 'ANY'

Logical value associated with a any value logical value

VALUE_NA = 'NA'

Logical value associated with a not applicable logical value

WILDCARD_MULTI = '*'

Constant associated with wildcard to indicate a sequence of characters

WILDCARD_ONE = '?'

Constant associated with wildcard to indicate a character

get_value()[source]

Returns the encoded value of component.

Returns:encoded value of component
Return type:string
set_value(comp_str, comp_att)[source]

Set the value of component.

Parameters:
  • comp_str (string) – value of component
  • comp_att (string) – attribute associated with comp_str
Returns:

None

Exception:

ValueError - incorrect value of component