def __init__( self ): super( RatijasDictionaryPlugin, self ).__init__() self.matter = u'' try: f = open( matter_filename, 'r' ) self.matter = u( f.read()) f.close() except Exception as e: print 'RatijasDictionaryPlugin: не найдено файла обложки словаря (%s)' % matter_filename
def __init__(self): super(RatijasDictionaryPlugin, self).__init__() self.matter = u'' try: f = open(matter_filename, 'r') self.matter = u(f.read()) f.close() except Exception as e: print 'RatijasDictionaryPlugin: не найдено файла обложки словаря (%s)' % matter_filename
def dictionary_begin(self): return ur'''<?xml version="1.0" encoding="UTF-8"?> <d:dictionary xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://www.apple.com/DTDs/DictionaryService-1.0.rng"> ''' + u(self.front_back_matter())
def dictionary_begin( self ): return ur'''<?xml version="1.0" encoding="UTF-8"?> <d:dictionary xmlns="http://www.w3.org/1999/xhtml" xmlns:d="http://www.apple.com/DTDs/DictionaryService-1.0.rng"> ''' + u( self.front_back_matter())