Beispiel #1
0
    def __init__(self, parsed):
        Thread.__init__(self)
        self.results = ParseEvaluator()
        self.parsed = parsed

        self.daemon = True
        self.start()
Beispiel #2
0
 def __init__(self, parsed):
     Thread.__init__(self)
     self.results = ParseEvaluator()
     self.parsed = parsed
     
     self.daemon = True
     self.start()
Beispiel #3
0
class Evaluator(Thread):
    def __init__(self, parsed):
        Thread.__init__(self)
        self.results = ParseEvaluator()
        self.parsed = parsed
        
        self.daemon = True
        self.start()
    
    def run(self):
        while True:
            key, tree = self.parsed.get()
            try:
                self.results.check_trees(loads(key), tree)
            except Exception as e:
                print('\nparsed: {%s}' % (tree))
                print('key   : {%s}' % (key.strip()))
                print(e)
            self.parsed.task_done()
Beispiel #4
0
class Evaluator(Thread):
    def __init__(self, parsed):
        Thread.__init__(self)
        self.results = ParseEvaluator()
        self.parsed = parsed

        self.daemon = True
        self.start()

    def run(self):
        while True:
            key, tree = self.parsed.get()
            try:
                self.results.check_trees(loads(key), tree)
            except Exception as e:
                print('\nparsed: {%s}' % (tree))
                print('key   : {%s}' % (key.strip()))
                print(e)
            self.parsed.task_done()