Sun, 21 Jan 2018 22:43:57 +0000
Use platform package to detect whether to:
* rumps vs. xdg for configuration file location, and
* try to display a tray icon
# # FIFO memory logger # from logging.handlers import BufferingHandler class FIFOHandler(BufferingHandler): def shouldFlush(self, record): return False def emit(self, record): self.buffer.append(record) l=len(self.buffer) if l>self.capacity: self.buffer=self.buffer[(l-self.capacity):(l-1)] def formatAll(self): return [self.format(record) for record in self.buffer]