Beispiel #1
0
    def __init__(self, gsfole):
        from gi.repository.Gsf import Input
        from gi.repository.Gsf import InfileMSOle

        if isinstance(gsfole, InfileMSOle):
            self.gsfole = gsfole
        elif isinstance(gsfole, Input):
            try:
                self.gsfole = InfileMSOle.new(gsfole)
            except Exception:
                raise InvalidOleStorageError()
        else:
            try:
                self.gsfole = open(gsfole)
            except Exception:
                raise InvalidOleStorageError()
Beispiel #2
0
    def __init__(self, gsfole):
        from gi.repository.Gsf import Input
        from gi.repository.Gsf import InfileMSOle

        if isinstance(gsfole, InfileMSOle):
            self.gsfole = gsfole
        elif isinstance(gsfole, Input):
            try:
                self.gsfole = InfileMSOle.new(gsfole)
            except Exception:
                raise InvalidOleStorageError()
        else:
            try:
                self.gsfole = open(gsfole)
            except Exception:
                raise InvalidOleStorageError()
Beispiel #3
0
def open(path):
    from gi.repository.Gsf import InputGio
    from gi.repository.Gsf import InfileMSOle

    inp = InputGio.new_for_path(path)
    return InfileMSOle.new(inp)
Beispiel #4
0
def open(path):
    from gi.repository.Gsf import InputGio
    from gi.repository.Gsf import InfileMSOle

    inp = InputGio.new_for_path(path)
    return InfileMSOle.new(inp)