def unicode_code(code):
 try:
  if code.isdigit():
   return unichr(int(code))
  else:
   match = unicode_pattern.match(code)
   if match:
    value = (match.group(1) or match.group(2))
    return unichr(int(value, 16))
   else:
    return code
 except OverflowError as detail:
  raise ValueError(('code too large (%s)' % detail))

def unicode_code ( code ) : try : if code . isdigit ( ) : return unichr ( int ( code ) ) else : match = unicode_pattern . match ( code ) if match : value = ( match . group ( 1 ) or match . group ( 2 ) ) return unichr ( int ( value , 16 ) ) else : return code except OverflowError as detail : raise ValueError ( ( 'code too large (%s)' % detail ) )
convert a unicode character code to a unicode character .