

def _run(self, args):
    if ((len(args['files']) < 1) or (len(args['files']) > 2)):
        raise Exception('Must view exactly one file.')
    self.__window = GafferUI.Window(title='Gaffer Viewer', sizeMode=GafferUI.Window.SizeMode.Manual)
    self.__window.setChild(GafferUI.CompoundPathPreview(Gaffer.FileSystemPath(args['files'][0])))
    self.__closedConnection = self.__window.closedSignal().connect(Gaffer.WeakMethod(self.__closed))
    self.__window._qtWidget().setMinimumSize(300, 200)
    args.__window.setVisible(True)
    GafferUI.EventLoop.mainEventLoop().start()
    return 0

dataset/ETHPy150Open ImageEngine/gaffer/apps/view/view-1.py view._run/VarMisuse@135/195 `self`->`args`