A small python wrapper to make the development of python extensions to Enso even easier.
The sample Enso extension code is not really dividing the XML-RPC extension service form the actual command code: http://www.ensowiki.com/wiki/index.php?title=Enso_Developer_Prototype_Documentation
This is a simple "hello world" using this wrapper:
from enso import EnsoExtension, Command
class Hello(Command):
def __init__(self):
Command.__init__(self,
name = 'hello',
desc = 'Enso Hello World',
)
def execute(self, postfix):
text = self.enso.getUnicodeSelection()
self.enso.displayMessage("<p>Hello %s</p>"%(text))
if __name__ == "__main__":
EnsoExtension([Hello()]).start()NEW: Added diff commands
- diff1: Store the selected text in a diff1.txt file
- diff2: Store the selected text in a diff2.txt file and launch "Winmerge diff1.txt diff2.txt"