How do I implement interfaces in python?

public interface IInterface { void show(); } public class MyClass : IInterface { #region IInterface Members public void show() { Console.WriteLine("Hello World!"); } #endregion } How do I implement Python equivalent of this C# code ? class IInterface(object): def __init__(self): pass def show(self): raise Exception("NotImplementedException") class MyClass(IInterface): def __init__(self): IInterface.__init__(self) def show(self): print 'Hello World!' … Read more

Plugin Development using classes – Public & Private Callbacks

Alright, so I’m developing a plugin where my plugin file is a class which holds all the functions related to the initiation of the plugin, such that I can simply provide all of the plugins functionalities by initiating the class. According to a variety of docs, I developed stuff in a way where I hook all of the plugin’s functionalities as callbacks onto the according hooks. Callbacks are defined as public functions in the class, and the callbacks are hooked via the class constructor; like so: