Warning:</span></h2><p> <span style="color:red;font-weight:bold"> One or more of the files to be created already exists. If you click "Create Script" those files will be deleted and new files created in their place.</span><p>""") return "\n".join(html) if __name__ == "__main__": # this includes when the script is run from the command line or # from the Scripter plugin. if CONTEXT_KRITA: # scripter plugin # give up - has the wrong context to create widgets etc. # maybe in the future change this. pass else: app = QApplication([]) extension = KritaScriptStarter(None) extension.setup() extension.action_triggered() sys.exit(app.exec_()) elif CONTEXT_KRITA: # And add the extension to Krita's list of extensions: app = Krita.instance() extension = KritaScriptStarter(parent=app) #instantiate your class app.addExtension(extension)