Did I find the right examples for you? yes no

All Samples(15)  |  Call(12)  |  Derive(0)  |  Import(3)
Insert 'symbol' at the beginning of the current line
    

        def level_marker(level=1, symbol='|', color='red'):
    """Insert 'symbol' at the beginning of the current line
    """
    #if OUTPUT_MODE == "color":
    #    return '\033[s\033[' + str(level) + 'G' + colored_print(symbol, color) + "\033[u\033[" + str(len(symbol) + 1) + "C"
    #else:
    return ""
        


src/d/i/Dialogs-0.13/src/dialogs/interpretation/questions_handler.py   Dialogs(Download)
 
from dialogs.helpers.helpers import colored_print
from dialogs.helpers.printers import level_marker
 
from dialogs.interpretation.resolution import Resolver
        builder = StatementBuilder(self._current_speaker)
        self._statements, situation_id = builder.process_sentence(self._sentence)
        logger.info(level_marker(level=2,
                                 color="yellow") + "Generated statements based on the sentence components: " + colored_print(
            str(self._statements), None, "magenta"))
            self._statements = self._set_situation_id(self._statements)
            logger.info(
                level_marker(level=2, color="yellow") + "Generated statements for this question: " + colored_print(
                    str(self._statements), None, "magenta"))
            #Processing :Do you know something?
                        onto_lookup = []
                        try:
                            logger.debug(level_marker(level=2,
                                                      color="yellow") + "Looking up for " + object + " in " + agent + "'s model")
                            onto_lookup = ResourcePool().ontology_server.lookupForAgent(agent, object)
            else:
                try:
                    logger.debug(level_marker(level=2, color="yellow") + "Checking in the ontology: " + colored_print(
                        str(self._statements), None, "magenta"))
                    self._answer = ResourcePool().ontology_server.check(self._statements)

src/d/i/Dialogs-0.13/src/dialogs/interpretation/content_analysis.py   Dialogs(Download)
 
from dialogs.helpers.helpers import colored_print
from dialogs.helpers.printers import level_marker
from dialogs.helpers import emotions
 
            emotions.satisfied()
            logger.info(
                level_marker(level=2, color="yellow") + "Found: \n" + colored_print(str(answer), None, "magenta"))
        else:
            emotions.sorry()
            logger.info(level_marker(level=2, color="yellow") + "Couldn't find anything!")

src/d/i/Dialogs-0.13/src/dialogs/sentence.py   Dialogs(Download)
 
from dialogs.helpers.sentence_atoms import *
from dialogs.helpers.printers import pprint, level_marker
from dialogs.helpers.helpers import colored_print
from dialogs.resources_manager import ResourcePool
    def __str__(self):
        res = level_marker() + pprint(self.data_type, SENTENCE_TYPE)
        res += pprint(self.aim, SENTENCE_AIM) # 'aim' may be None
 
        if self.sn:
    def __str__(self):
 
        res = level_marker()
 
        if self._conjunction != 'AND':