Guest User

Untitled

a guest
Apr 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. Index: core/enso/config.py
  2. ===================================================================
  3. --- core/enso/config.py (revision 23)
  4. +++ core/enso/config.py (working copy)
  5. @@ -64,4 +64,4 @@
  6. # List of modules/packages that support the plugin interface to
  7. # extend Enso. The plugins are loaded in the order that they
  8. # are specified in this list.
  9. -PLUGINS = ["enso.contrib.google"]
  10. +PLUGINS = ["enso.contrib.google","hello"]
  11. Index: core/hello.py
  12. ===================================================================
  13. --- core/hello.py (revision 0)
  14. +++ core/hello.py (revision 0)
  15. @@ -0,0 +1,16 @@
  16. +from enso.commands.manager import CommandManager
  17. +from enso.commands.interfaces import CommandObject
  18. +from enso.events import EventManager
  19. +from enso import messages
  20. +command_manager = CommandManager.get()
  21. +event_manager = EventManager.get()
  22. +
  23. +class AptGet(CommandObject):
  24. + def run(self):
  25. + messages.displayMessage("<p>Hello World!</p><caption>This was going to be an apt-get install script, but instead it became <command>hello</command>.</caption>")
  26. +
  27. +def load():
  28. + aptget = AptGet()
  29. + aptget.setDescription("prints hello in console")
  30. + command_manager.registerCommand("hello",aptget)
  31. +
Add Comment
Please, Sign In to add comment