Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
bundle = NSBundle.mainBundle()
if bundle:
info = (bundle.localizedInfoDictionary() or
bundle.infoDictionary())
if info:
info["CFBundleName"] = app_name
matplotlib.use("Qt5Agg")
app = QApplication(sys.argv)
app.setApplicationName(app_name)
app.setOrganizationName("cbrnr")
if sys.platform.startswith("darwin"):
app.setAttribute(Qt.AA_DontShowIconsInMenus, True)
app.setAttribute(Qt.AA_UseHighDpiPixmaps)
model = Model()
model.view = MainWindow(model)
if len(sys.argv) > 1: # open files from command line arguments
for f in sys.argv[1:]:
model.load(f)
model.view.show()
sys.exit(app.exec_())