parameters: ()
docstring: Prepare unicode property tables and key pattern
docstring_summary: Prepare unicode property tables and key pattern
docstring_tokens: Prepare unicode property tables and key pattern
function: def _init_unicode():
      """
      Prepare unicode property tables and key pattern
      """
      global _loaded
      global _unicode_properties
      global _unicode_key_pattern
      if _use_cache is not None:
          props = join(_use_cache, "%s_unicode_properties.cache" % _cache_prefix)
          if (not exists(join(_use_cache, "%s_unicode_properties.cache" % _cache_prefix))):
              _unicode_properties = _build_unicode_property_table((0x0000, 0x10FFFF))
              _unicode_key_pattern = _build_unicode_key_pattern()
  
              try:
                  with open(props, 'wb') as f:
                      pickle.dump(_unicode_key_pattern, f)
                      pickle.dump(_unicode_properties, f)
              except Exception as e:
                  if exists(props):
                      unlink(props)
          else:
              try:
                  with open(props, 'rb') as f:
                      _unicode_key_pattern = pickle.load(f)
                      _unicode_properties = pickle.load(f)
              except Exception as e:
                  if exists(props):
                      unlink(props)
                  _unicode_properties = _build_unicode_property_table((0x0000, 0x10FFFF))
                  _unicode_key_pattern = _build_unicode_key_pattern()
      else:
          _unicode_properties = _build_unicode_property_table((0x0000, 0x10FFFF))
          _unicode_key_pattern = _build_unicode_key_pattern()
  
      _loaded = True
function_tokens: def _init_unicode ( ) : global _loaded global _unicode_properties global _unicode_key_pattern if _use_cache is not None : props = join ( _use_cache , "%s_unicode_properties.cache" % _cache_prefix ) if ( not exists ( join ( _use_cache , "%s_unicode_properties.cache" % _cache_prefix ) ) ) : _unicode_properties = _build_unicode_property_table ( ( 0x0000 , 0x10FFFF ) ) _unicode_key_pattern = _build_unicode_key_pattern ( ) try : with open ( props , 'wb' ) as f : pickle . dump ( _unicode_key_pattern , f ) pickle . dump ( _unicode_properties , f ) except Exception as e : if exists ( props ) : unlink ( props ) else : try : with open ( props , 'rb' ) as f : _unicode_key_pattern = pickle . load ( f ) _unicode_properties = pickle . load ( f ) except Exception as e : if exists ( props ) : unlink ( props ) _unicode_properties = _build_unicode_property_table ( ( 0x0000 , 0x10FFFF ) ) _unicode_key_pattern = _build_unicode_key_pattern ( ) else : _unicode_properties = _build_unicode_property_table ( ( 0x0000 , 0x10FFFF ) ) _unicode_key_pattern = _build_unicode_key_pattern ( ) _loaded = True