예제 #1
0
파일: hooks.py 프로젝트: Efreak/elinks
 def _callback(self, input):
     """Evalute input and display the result (unless it's None)."""
     if input is None:
         # The user canceled.
         return
     result = eval(input)
     if result is not None:
         elinks.info_box(result, "Result")
예제 #2
0
 def _callback(self, input):
     """Evalute input and display the result (unless it's None)."""
     if input is None:
         # The user canceled.
         return
     result = eval(input)
     if result is not None:
         elinks.info_box(result, "Result")
예제 #3
0
파일: hooks.py 프로젝트: Efreak/elinks
 def _tally(self, title, new, errors):
     """Record and report feed statistics."""
     self._results[title] = (new, errors)
     if len(self._results) == len(self._feeds):
         feeds = self._results.keys()
         feeds.sort()
         width = max([len(title) for title in feeds])
         fmt = "%*s   new entries: %2d   errors: %2d\n"
         summary = ""
         for title in feeds:
             new, errors = self._results[title]
             summary += fmt % (-width, title, new, errors)
         elinks.info_box(summary, "Feed Statistics")
예제 #4
0
 def _tally(self, title, new, errors):
     """Record and report feed statistics."""
     self._results[title] = (new, errors)
     if len(self._results) == len(self._feeds):
         feeds = self._results.keys()
         feeds.sort()
         width = max([len(title) for title in feeds])
         fmt = "%*s   new entries: %2d   errors: %2d\n"
         summary = ""
         for title in feeds:
             new, errors = self._results[title]
             summary += fmt % (-width, title, new, errors)
         elinks.info_box(summary, "Feed Statistics")