def save(self): try: f = open('/tmp/positionersetup.log', 'w') f.write(log.getvalue()) f.close() except Exception, e: self["list"].setText(_("Failed to write /tmp/positionersetup.log: ") + str(e))
def save(self): try: f = open('/tmp/epgimport.log', 'w') f.write(log.getvalue()) f.close() except Exception, e: self["list"].setText("Failed to write /tmp/epgimport.log:str" + str(e))
def __init__(self, session): self.session = session Screen.__init__(self, session) Screen.setTitle(self, 'IPTV Bouquet Maker - Log') self.skinName = ['E2m3u2b_Log', 'AutoBouquetsMaker_Log'] self['key_red'] = Button('Close') self['key_green'] = Button('Save') self['key_blue'] = Button('Clear') self['list'] = ScrollLabel(log.getvalue()) self['actions'] = ActionMap( [ 'DirectionActions', 'OkCancelActions', 'ColorActions', 'MenuActions' ], { 'red': self.keyCancel, 'green': self.keySave, 'blue': self.keyClear, 'cancel': self.keyCancel, 'ok': self.keyCancel, 'left': self['list'].pageUp, 'right': self['list'].pageDown, 'up': self['list'].pageUp, 'down': self['list'].pageDown, 'pageUp': self['list'].pageUp, 'pageDown': self['list'].pageDown, 'menu': self.keyCancel }, -2)
def __init__(self, session): self.session = session Screen.__init__(self, session) Screen.setTitle(self, "IPTV Bouquet Maker - Log") self.skinName = ["E2m3u2b_Log", "AutoBouquetsMaker_Log"] self["key_red"] = Button("Close") self["key_green"] = Button("Save") self["key_blue"] = Button("Clear") self["list"] = ScrollLabel(log.getvalue()) self["actions"] = ActionMap( [ "DirectionActions", "OkCancelActions", "ColorActions", "MenuActions" ], { "red": self.keyCancel, "green": self.keySave, "blue": self.keyClear, "cancel": self.keyCancel, "ok": self.keyCancel, "left": self["list"].pageUp, "right": self["list"].pageDown, "up": self["list"].pageUp, "down": self["list"].pageDown, "pageUp": self["list"].pageUp, "pageDown": self["list"].pageDown, "menu": self.keyCancel, }, -2)
def __init__(self, session): self.session = session Screen.__init__(self, session) self["key_red"] = Button(_("Clear")) self["key_green"] = Button() self["key_yellow"] = Button() self["key_blue"] = Button(_("Save")) self["list"] = ScrollLabel(log.getvalue()) self["actions"] = ActionMap(["DirectionActions", "OkCancelActions", "ColorActions", "MenuActions"], { "red": self.clear, "green": self.cancel, "yellow": self.cancel, "save": self.save, "blue": self.save, "cancel": self.cancel, "ok": self.cancel, "left": self["list"].pageUp, "right": self["list"].pageDown, "up": self["list"].pageUp, "down": self["list"].pageDown, "pageUp": self["list"].pageUp, "pageDown": self["list"].pageDown, "menu": self.cancel, }, -2) self.onLayoutFinish.append(self.setCustomTitle)
def __init__(self, session): with open(resolveFilename(SCOPE_PLUGINS, 'Extensions/E2m3u2bouquet/skins/{}/'.format(ScreenWidth)) + 'log.xml', 'r') as f: self.skin = f.read() self.session = session Screen.__init__(self, session) Screen.setTitle(self, 'IPTV Bouquet Maker - Log') self.skinName = 'AutoBouquetsMaker_Log' self["list"] = ScrollLabel(log.getvalue()) self["actions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions", "MenuActions"], { "red": self.keyCancel, "green": self.keySave, "blue": self.keyClear, "cancel": self.keyCancel, "ok": self.keyCancel, "left": self["list"].pageUp, "right": self["list"].pageDown, "up": self["list"].pageUp, "down": self["list"].pageDown, "menu": self.closeRecursive, }, -2) self["key_red"] = Button(_("Close")) self["key_green"] = Button(_("Save")) self["key_blue"] = Button(_("Clear"))
def save(self): try: f = open('/tmp/epgimport.log', 'w') f.write(log.getvalue()) self.session.open(MessageBox, _("Write to /tmp/epgimport.log"), MessageBox.TYPE_INFO, timeout=5, close_on_any_key=True) f.close() except Exception, e: self["list"].setText("Failed to write /tmp/epgimport.log:str" + str(e))
def save(self): try: f = open('/tmp/epgimport.log', 'w') f.write(log.getvalue()) self.session.open(MessageBox, _("Write to /tmp/epgimport.log"), MessageBox.TYPE_INFO, timeout = 5, close_on_any_key = True) f.close() except Exception, e: self["list"].setText("Failed to write /tmp/epgimport.log:str" + str(e))
def save(self): output = open('/tmp/abm.log', 'w') output.write(log.getvalue()) output.close() self.session.open( MessageBox, _("ABM log file has been saved to the tmp directory"), MessageBox.TYPE_INFO, timeout=45)
def keySave(self): path = tempfile.gettempdir() filename = os.path.join(path, 'e2m3u2bouquet.log') with open(filename, 'w') as f: f.write(log.getvalue()) self.session.open(MessageBox, 'Log file has been saved to the tmp directory', MessageBox.TYPE_INFO, timeout=30)
def __init__(self, session): self.session = session Screen.__init__(self, session) Screen.setTitle(self, _("AutoBouquetsMaker Log")) self["list"] = ScrollLabel(log.getvalue()) self["setupActions"] = ActionMap(["SetupActions", "ColorActions", "DirectionActions", "MenuActions"], { "cancel": self.cancel, "ok": self.cancel, "up": self["list"].pageUp, "down": self["list"].pageDown, "menu": self.closeRecursive, }, -2)
def save(self): output = open('/tmp/abm.log', 'w') output.write(log.getvalue()) output.close() self.session.open(MessageBox,_("ABM log file has been saved to the tmp directory"),MessageBox.TYPE_INFO, timeout = 45)
def keySave(self): with open(os.path.join(tempfile.gettempdir(), 'e2m3u2bouquet.log'), 'w') as f: f.write(log.getvalue()) self.session.open(MessageBox, _("Log file has been saved to the tmp directory"), MessageBox.TYPE_INFO, timeout=30)