def main(): rmc = Viewer() arg = None isfile = True if len(argv) > 1: arg = abspath(argv[1]) if not exists(arg): arg = None elif isdir(arg): isfile = False dngs = [f for f in listdir(arg) if f.lower().endswith(".dng")] if len(dngs) > 0: isfile = True if arg and isfile: rmc.load(abspath(arg)) else: rmc.openBrowser(arg) ret = rmc.run() PerformanceLog.PLOG_PRINT() return ret