'Set the text of the editor from file *fname*'

def set_text_from_file(self, filename, language=None):

    (text, _enc) = encoding.read(filename)
    if (language is None):
        language = get_file_language(filename, text)
    self.set_language(language, filename)
    self.set_text(text)
