o 좃[@sXddlmZmZmZddlZ[[[ddZddZejddkr&dd ZdSd d ZdS) )absolute_importprint_functionunicode_literalsNcsDddlmtfddtD}||t|S)zCalled by the constant modules to load up the constants from the C library starting with PREFIX. Matching constants will be inserted into SCOPE with PREFIX stripped from the names. Returns the names of inserted constants. )gpgmecs*i|]}|r|dt|qSN) startswithgetattr).0 identifierrindexprefix*/usr/lib/python3/dist-packages/gpg/util.py #s  z%process_constants..)rlendirupdatelistkeys)rscope constantsrr rprocess_constantss   rcCsddd|DS)NrcssF|]}|dks|dks|dkst|dkrdt|n|VqdS)+"% z%{0:2x}N)ordformat)r crrr ,s$ z!percent_escape..)join)srrrpercent_escape+s r%cC t|tSr) isinstancestrxrrr is_a_string4 r,cCr'r)r( basestringr*rrrr,8r-) __future__rrrsysrr% version_infor,rrrrs