Exemplo n.º 1
0
    def __init__(self, source):
        if isinstance(source, str):
            source = ContentObject.from_file(source)
        elif not isinstance(source, ContentObject):
            raise ValueError("Unsupported source type %s!" % type(source))

        self.columns = []
        self.rows = []
        self.max = None
        self.newline = "\n"
        self.tlk_columns = None
        self.tlk_offset = None
        self.co = source
        self.description = None
        self.parse(source.get('r'))
Exemplo n.º 2
0
    def __init__(self, source):
        if isinstance(source, str):
            source = ContentObject.from_file(source)
        elif not isinstance(source, ContentObject):
            raise ValueError("Unsupported source type %s!" % type(source))

        self.columns = []
        self.rows = []
        self.max = None
        self.newline = "\n"
        self.default = None
        self.co = source
        data = source.get()
        if not isinstance(data, str):
            data = data.decode(get_encoding())
        self.parse(data)
Exemplo n.º 3
0
    def __init__(self, source):
        if isinstance(source, str):
            source = ContentObject.from_file(source)
        elif not isinstance(source, ContentObject):
            raise ValueError("Unsupported source type %s!" % type(source))

        self.columns = []
        self.rows = []
        self.max = None
        self.newline = "\n"
        self.default = None
        self.co = source
        data = source.get()
        if not isinstance(data, str):
            data = data.decode(get_encoding())
        self.parse(data)