How to use the termcolor.printcolor function in termcolor

To help you get started, we’ve selected a few termcolor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github huydx / fulltext_engine / searcher.py View on Github external
def print_result(self, search_result, query):
    #[TODO] print matched words with color
    for elem in search_result:
      doc = self.engine.content.get(elem[0])
      termcolor.printcolor(doc, query)
      print ""