wxPython/wxGlade-0.9.1/codegen/__init__.py
def _load_file(self, filename):
        "Load a file and return the content. The read source file will be decoded to unicode automatically."
        # Separated for debugging purposes
        lines = common._read_file(filename)

        encoding = self.code_writer.app_encoding
        if encoding:
            try:
                lines = [line.decode(encoding) for line in lines]
            except UnicodeDecodeError:
                raise errors.WxgReadSourceFileUnicodeError(filename)

        return lines
Load a file and return the content. The read source file will be decoded to unicode automatically.
Load a file and return the content. The read source file will be decoded to unicode automatically.
Load a file and return the content . The read source file will be decoded to unicode automatically .
def _load_file(self, filename):
        lines = common._read_file(filename)
        encoding = self.code_writer.app_encoding
        if encoding:
            try:
                lines = [line.decode(encoding) for line in lines]
            except UnicodeDecodeError:
                raise errors.WxgReadSourceFileUnicodeError(filename)
        return lines
def _load_file ( self , filename ) : lines = common . _read_file ( filename ) encoding = self . code_writer . app_encoding if encoding : try : lines = [ line . decode ( encoding ) for line in lines ] except UnicodeDecodeError : raise errors . WxgReadSourceFileUnicodeError ( filename ) return lines
Load a file and return the content.
Load a file and return the content .
"Load a file and return the content. The read source file will be decoded to unicode automatically." # Separated for debugging purposes
self
filename