示例#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")