
from docopt import docopt
import plugins

__author__ = 'peter'


def main():
    args = docopt(__doc__)

    # Find plugins
    ps = plugins.get_plugins()

    # For each plugin, check if it's applicable and if so, run it
    for p in ps:
        plugin = p(args)
        if plugin.sentinel():
            print(plugin.handle())


if __name__ == '__main__':
    main()
import colorama

from docopt import docopt
import plugins

__author__ = 'peter'


def main():
    args = docopt(__doc__)

    # Find plugins
    ps = plugins.get_plugins()

    # Initialize colorama
    colorama.init()

    # For each plugin, check if it's applicable and if so, run it
    for p in ps:
        plugin = p(args)
        if plugin.sentinel():
            print(plugin.short_description)
            print(plugin.handle())


if __name__ == '__main__':
    main()
Use colorama to print colors and print a plugin's short_description after running
Use colorama to print colors and print a plugin's short_description after running

+ import colorama
  
  from docopt import docopt
  import plugins
  
  __author__ = 'peter'
  
  
  def main():
      args = docopt(__doc__)
  
      # Find plugins
      ps = plugins.get_plugins()
  
+     # Initialize colorama
+     colorama.init()
+ 
      # For each plugin, check if it's applicable and if so, run it
      for p in ps:
          plugin = p(args)
          if plugin.sentinel():
+             print(plugin.short_description)
              print(plugin.handle())
  
  
  if __name__ == '__main__':
      main()
Use colorama to print colors and print a plugin's short_description after running
## Code Before:

from docopt import docopt
import plugins

__author__ = 'peter'


def main():
    args = docopt(__doc__)

    # Find plugins
    ps = plugins.get_plugins()

    # For each plugin, check if it's applicable and if so, run it
    for p in ps:
        plugin = p(args)
        if plugin.sentinel():
            print(plugin.handle())


if __name__ == '__main__':
    main()
## Instruction:
Use colorama to print colors and print a plugin's short_description after running
## Code After:
import colorama

from docopt import docopt
import plugins

__author__ = 'peter'


def main():
    args = docopt(__doc__)

    # Find plugins
    ps = plugins.get_plugins()

    # Initialize colorama
    colorama.init()

    # For each plugin, check if it's applicable and if so, run it
    for p in ps:
        plugin = p(args)
        if plugin.sentinel():
            print(plugin.short_description)
            print(plugin.handle())


if __name__ == '__main__':
    main()