Пример #1
0
 def __init__(self):
     super(ProblemWatchThread, self).__init__()
     self.pwatch = problem.get_problem_watcher()
     self.pwatch.add_callback(self.handle)
     self.probcount = 0
Пример #2
0
import sys
import problem


def monitor(prob):
    print(prob)
    sys.stdout.flush()

pwatch = problem.get_problem_watcher()
pwatch.add_callback(monitor)
pwatch.run()
Пример #3
0
 def __init__(self):
     super(ProblemWatchThread, self).__init__()
     self.pwatch = problem.get_problem_watcher()
     self.pwatch.add_callback(self.handle)
     self.probcount = 0