def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("About")) hddsplit = skin.parameters.get("AboutHddSplit", 0) AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" AboutText += _("CPU: ") + about.getCPUInfoString() + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Build date: ") + about.getBuildDateString() + "\n" # [WanWizard] Removed until we find a reliable way to determine the installation date # AboutText += _("Installed: ") + about.getFlashDateString() + "\n" # [WanWizard] No longer that relevant as we now have an accurate build date # as I'm not sure this variable isn't used elsewhere, I haven't removed it ImageVersion = _("Last upgrade: ") + about.getImageVersionString() self["ImageVersion"] = StaticText(ImageVersion) # AboutText += ImageVersion + "\n" EnigmaVersion = about.getEnigmaVersionString().rsplit("-", 2) if len(EnigmaVersion) == 3: EnigmaVersion = EnigmaVersion[0] + " " + EnigmaVersion[2] + "-" + EnigmaVersion[1] else: EnigmaVersion = " ".join(EnigmaVersion) EnigmaVersion = _("Enigma version: ") + EnigmaVersion self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += "\n" + EnigmaVersion + "\n" AboutText += _("Kernel version: ") + about.getKernelVersionString() + "\n" AboutText += _("DVB driver version: ") + about.getDriverInstalledDate() + "\n" GStreamerVersion = _("GStreamer version: ") + about.getGStreamerVersionString().replace("GStreamer","") self["GStreamerVersion"] = StaticText(GStreamerVersion) AboutText += GStreamerVersion + "\n" FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString()
def updateInfo(self): #self.DynamicTimer.start(6000) rc = system("df -h > /tmp/syinfo.tmp") self.text = _("BOX\n") f = open("/proc/stb/info/model",'r') self.text += _("Model:\t%s") % str(getMachineBrand()) + " " + str(getMachineName()) + "\n" f.close() #f = open("/proc/stb/info/chipset",'r') #self.text += "Chipset:\t" + about.getChipSetString() + "\n" #f.close() cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'" cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'" try: res = popen(cmd).read() res2 = popen(cmd2).read() except: res = "" res2 = "" cpuMHz = "" bogoMIPS = "" if getMachineBuild() in ('vusolo4k','vuultimo4k','vuzero4k'): cpuMHz = " \t(1,5 GHz)" elif getMachineBuild() in ('formuler1tc','formuler1','triplex','tiviaraplus'): cpuMHz = " \t(1,3 GHz)" elif getMachineBuild() in ('u51','u5','u53','u52','u5pvr','h9'): cpuMHz = " \t(1,6 GHz)" elif getMachineBuild() in ('vuuno4kse','vuuno4k','gbquad4k','dm900','dm920','gb7252','dags7252','xc7439','8100s'): cpuMHz = " \t(1,7 GHz)" elif getMachineBuild() in ('alien5'): cpuMHz = " \t(2,0 GHz)" elif getMachineBuild() in ('sf5008','et13000','et1x000','hd52','hd51','sf4008','vs1500','h7'): try: import binascii f = open('/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb') clockfrequency = f.read() f.close() cpuMHz = " \t(%s MHz)" % str(round(int(binascii.hexlify(clockfrequency), 16)/1000000,1)) except: cpuMHz = " \t(1,7 GHz)" elif res: cpuMHz = " \t(" + res.replace("\n", "") + " MHz)" if res2: bogoMIPS = "" + res2.replace("\n", "") f = open('/proc/cpuinfo', 'r') self.text += "CPU: \t" + str(about.getCPUString()) + cpuMHz + " " + str(about.getCpuCoresString2()) + "\n" self.text += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n" self.text += _("Architecture:\t %s") % str(about.getCPUArch()) + "\n" #self.text += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n" self.text += "BogoMIPS: \t" + bogoMIPS + "\n" f.close() #self.text += _("\nMEMORY\n") #self.text += _("Total:\t%s") % str(about.getRAMTotalString()) + " MB\n" #self.text += _("Free:\t%s ") % str(about.getRAMFreeString()) + " MB (" + str(about.getRAMFreePorcString()) + ")\n" #self.text += _("Usage:\t%s") % str(about.getRAMUsedString()) + " MB (" + str(about.getRAMusageString()) + ")\n" #self.text += _("Shared:\t%s") % str(about.getRAMSharingString()) + " MB" + "\n" #self.text += _("Stored:\t%s") % str(about.getRAMStoredString()) + " MB" + "\n" #self.text += _("Cached:\t%s") % str(about.getRAMCachedString()) + " MB" + "\n" #out_lines = file("/proc/meminfo").readlines() #for lidx in range(len(out_lines) - 1): # tstLine = out_lines[lidx].split() # if "Buffers:" in tstLine: # Buffers = out_lines[lidx].split() # self.text += _("Buffers:") + "\t" + Buffers[1] + ' kB'"\n" # if "Cached:" in tstLine: # Cached = out_lines[lidx].split() # self.text += _("Cached:") + "\t" + Cached[1] + ' kB'"\n" #self.text += _("Swap total:\t%s") % str(about.getRAMSwapTotalString()) + " MB\n" #self.text += _("Swap free:\t%s") % str(about.getRAMSwapFreeString()) + " MB\n" #self.text += _("\nSTORAGE\n") #if os.path.exists('/tmp/syinfo.tmp'): # try: # f = open("/tmp/syinfo.tmp",'r') # line = f.readline() # parts = line.split() # self.text += parts[0] + "\t" + parts[1].strip() + " " + parts[2].strip() + " " + parts[3].strip() + " " + parts[4] + "\n" # line = f.readline() # parts = line.split() # self.text += "Flash" + "\t" + parts[1].strip() + " " + parts[2].strip() + " " + parts[3].strip() + " " + parts[4] + "\n" # for line in f.readlines(): # if line.find('/media/') != -1: # line = line.replace('/media/', ' ') # parts = line.split() # if len(parts) == 6: # self.text += parts[5] + "\t" + parts[1].strip() + " " + parts[2].strip() + " " + parts[3].strip() + " " + parts[4] + "\n" # f.close() # os_remove("/tmp/syinfo.tmp") # except: # return self.text += "\nSOFTWARE\n" openLD = "OpenLD " self.text += "Firmware:\t %s" % openLD + str(about.getImageVersion()) + "\n" self.text += _("CodeName:\t %s") % str(getImageCodeName()) + "\n" self.text += "Kernel: \t " + about.getKernelVersionString() + "\n" self.text += _("DVB drivers:\t %s") % MyDateConverter(str(about.getDriverInstalledDate())) + "\n" self.text += _("Last update:\t %s") % MyDateConverter(str(getEnigmaVersionString())) + "\n" self.text += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n" self.text += _("Uptime:\t %s") % str(about.getUptimeString()) + "\n" self.text += _("GStreamer:\t %s") % str(about.getGStreamerVersionString().replace('GStreamer','')) + "\n" if path.exists('/usr/bin/ffmpeg'): try: self.text += _("FFmpeg:\t %s") % str(about.getFFmpegVersionString()) + "\n" except: pass self.text += _("Python:\t %s") % about.getPythonVersionString() + "\n\n" self["lab1"].setText(self.text)
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("About")) hddsplit = skin.parameters.get("AboutHddSplit", 0) AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" cpu = about.getCPUInfoString() AboutText += _("CPU: ") + cpu + "\n" AboutText += _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Build date: ") + about.getBuildDateString() + "\n" AboutText += _("Last update: ") + about.getUpdateDateString() + "\n" # [WanWizard] Removed until we find a reliable way to determine the installation date # AboutText += _("Installed: ") + about.getFlashDateString() + "\n" EnigmaVersion = about.getEnigmaVersionString() EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2) if len(EnigmaVersion) == 3: EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[ 2] + "-" + EnigmaVersion[1] + ")" else: EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")" EnigmaVersion = _("Enigma version: ") + EnigmaVersion self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += "\n" + EnigmaVersion + "\n" AboutText += _( "Kernel version: ") + about.getKernelVersionString() + "\n" AboutText += _( "DVB driver version: ") + about.getDriverInstalledDate() + "\n" GStreamerVersion = _("GStreamer version: " ) + about.getGStreamerVersionString(cpu).replace( "GStreamer", "") self["GStreamerVersion"] = StaticText(GStreamerVersion) AboutText += GStreamerVersion + "\n" FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString() self["FFmpegVersion"] = StaticText(FFmpegVersion) AboutText += FFmpegVersion + "\n" AboutText += _( "Python version: ") + about.getPythonVersionString() + "\n" AboutText += _( "Enigma (re)starts: %d\n") % config.misc.startCounter.value AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl() fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %s") % fp_version AboutText += fp_version + "\n" self["FPVersion"] = StaticText(fp_version) AboutText += _('Skin & Resolution: %s (%sx%s)\n') % ( config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height()) self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimListCompressed() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)" for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free() / 1024.0, "G", _("free")) else: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free(), "M", _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo + "\n\n" + _("Network Info:") for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\n" + x[0] + ": " + x[1] AboutText += '\n\n' + _("Uptime") + ": " + about.getBoxUptime() AboutText += "\n" AboutText += "\n" AboutText += _("Additional image information: ") + "\n" AboutText += _("Idea: ") + about.getIdea() + "\n" AboutText += _("E-mail: ") + about.getEmail() + "\n" AboutText += _("Donate: ") + about.getDonate() + "\n" self["AboutScrollLabel"] = ScrollLabel(AboutText) self["key_green"] = Button(_("Translations")) self["key_red"] = Button(_("Latest Commits")) self["key_yellow"] = Button(_("Troubleshoot")) self["key_blue"] = Button(_("Memory Info")) self["actions"] = ActionMap( ["ColorActions", "SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "red": self.showCommits, "green": self.showTranslationInfo, "blue": self.showMemoryInfo, "yellow": self.showTroubleshoot, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def populate(self): self["lab1"] = StaticText(_("Open Black Hole")) self["lab2"] = StaticText(_("From the BH Team")) model = None AboutText = "" self["lab3"] = StaticText( _("Support at %s") % "www.vuplus-community.net") AboutText += _("Model:\t%s %s\n") % (getMachineBrand(), getMachineName()) if about.getChipSetString() != _("unavailable"): if SystemInfo["HasHiSi"]: AboutText += _("Chipset:\tHiSilicon %s\n" ) % about.getChipSetString().upper() elif about.getIsBroadcom(): AboutText += _("Chipset:\tBroadcom %s\n" ) % about.getChipSetString().upper() else: AboutText += _( "Chipset:\t%s\n") % about.getChipSetString().upper() AboutText += _("CPU:\t%s %s %s\n") % (about.getCPUArch(), about.getCPUSpeedString(), about.getCpuCoresString()) imageSubBuild = "" if getImageType() != 'release': imageSubBuild = ".%s" % getImageDevBuild() AboutText += _("Image:\t%s.%s%s (%s)\n") % (getImageVersion( ), getImageBuild(), imageSubBuild, getImageType().title()) if SystemInfo["HasH9SD"]: if "rootfstype=ext4" in open( '/sys/firmware/devicetree/base/chosen/bootargs', 'r').read(): part = " - SD card in use for Image root \n" else: part = " - eMMC slot in use for Image root \n" AboutText += _("%s") % part if SystemInfo["canMultiBoot"]: slot = image = GetCurrentImage() part = "eMMC slot %s" % slot bootmode = "" if SystemInfo["canMode12"]: bootmode = "bootmode = %s" % GetCurrentImageMode() print "[About] HasHiSi = %s, slot = %s" % (SystemInfo["HasHiSi"], slot) if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][ slot]['root']: if slot > 4: image -= 4 else: image -= 1 part = "SDcard slot %s (%s) " % ( image, SystemInfo["canMultiBoot"][slot]['root']) AboutText += _("Image Slot:\t%s") % "STARTUP_" + str( slot) + " " + part + " " + bootmode + "\n" skinWidth = getDesktop(0).size().width() skinHeight = getDesktop(0).size().height() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t%s\n") % driversdate AboutText += _("Kernel:\t%s\n") % about.getKernelVersionString() AboutText += _("GStreamer:\t%s\n") % about.getGStreamerVersionString( ).replace("GStreamer ", "") AboutText += _("FFmpeg:\t%s\n") % about.getFFmpegVersionString( ).replace("FFmpeg ", "") AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Installed:\t%s\n") % about.getFlashDateString() AboutText += _("Last update:\t%s\n") % getEnigmaVersionString() AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Skin:\t%s") % config.skin.primary_skin.value[0:-9] + _( " (%s x %s)") % (skinWidth, skinHeight) + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): with open('/proc/stb/sensors/temp0/value', 'r') as f: tempinfo = f.read() elif path.exists('/proc/stb/fp/temp_sensor'): with open('/proc/stb/fp/temp_sensor', 'r') as f: tempinfo = f.read() elif path.exists('/proc/stb/sensors/temp/value'): with open('/proc/stb/sensors/temp/value', 'r') as f: tempinfo = f.read() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): with open('/proc/stb/fp/temp_sensor_avs', 'r') as f: tempinfo = f.read() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: with open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') as f: tempinfo = f.read() tempinfo = tempinfo[:-4] except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: tempinfo = search( 'temperature = (\d+) degree', open("/proc/hisi/msp/pm_cpu").read()).group(1) except: tempinfo = "" if tempinfo and int(tempinfo) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("FP version:\t%s") % fp_version AboutText += fp_version + "\n" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t%s\n") % (bootloader) self["AboutScrollLabel"] = ScrollLabel(AboutText)
def getInfo(session=None, need_fullinfo=False): # TODO: get webif versione somewhere! info = {} global STATICBOXINFO if not (STATICBOXINFO is None or need_fullinfo): return STATICBOXINFO info['brand'] = getBoxBrand() info['model'] = getBoxType() info['platform'] = boxbranding.getMachineBuild() try: info['procmodel'] = getBoxProc() except: # noqa: E722 info['procmodel'] = boxbranding.getMachineProcModel() try: info['procmodeltype'] = getBoxProcType() except: # noqa: E722 info['procmodeltype'] = None try: info['lcd'] = getLcd() except: # noqa: E722 info['lcd'] = 0 try: info['grabpip'] = getGrabPip() except: # noqa: E722 info['grabpip'] = 0 cpu = about.getCPUInfoString() info['chipset'] = cpu info['cpubrand'] = about.getCPUBrand() info['socfamily'] = boxbranding.getSoCFamily() info['cpuarch'] = about.getCPUArch() if config.OpenWebif.about_benchmark.value is True: info['cpubenchmark'] = about.getCPUBenchmark() else: info['cpubenchmark'] = _("Disabled in configuration") info['flashtype'] = about.getFlashType() memFree = 0 for line in open("/proc/meminfo", 'r'): parts = line.split(':') key = parts[0].strip() if key == "MemTotal": info['mem1'] = parts[1].strip().replace("kB", _("kB")) elif key in ("MemFree", "Buffers", "Cached"): memFree += int(parts[1].strip().split(' ', 1)[0]) info['mem2'] = "%s %s" % (memFree, _("kB")) info['mem3'] = _("%s free / %s total") % (info['mem2'], info['mem1']) info['uptime'] = about.getBoxUptime() info["webifver"] = OPENWEBIFVER info['imagedistro'] = boxbranding.getImageDistro() info['oever'] = boxbranding.getImageBuild() info['visionversion'] = boxbranding.getVisionVersion() info['visionrevision'] = boxbranding.getVisionRevision() info['visionmodule'] = about.getVisionModule() if fileExists("/etc/openvision/multiboot"): multibootflag = open("/etc/openvision/multiboot", "r").read().strip() if multibootflag == "1": info['multiboot'] = _("Yes") else: info['multiboot'] = _("No") else: info['multiboot'] = _("Yes") info['enigmaver'] = getEnigmaVersionString() info['driverdate'] = about.getDriverInstalledDate() info['kernelver'] = boxbranding.getKernelVersion() info['dvbapitype'] = about.getDVBAPI() info['gstreamerversion'] = about.getGStreamerVersionString(cpu) info['ffmpegversion'] = about.getFFmpegVersionString() info['pythonversion'] = about.getPythonVersionString() try: info['hwserial'] = getHWSerial() except: # noqa: E722 info['hwserial'] = None if (info['hwserial'] is None or info['hwserial'] == "unknown"): info['hwserial'] = about.getCPUSerial() try: info['boxrctype'] = getBoxRCType() except: # noqa: E722 info['boxrctype'] = None if (info['boxrctype'] is None or info['boxrctype'] == "unknown"): if fileExists("/usr/bin/remotecfg"): info['boxrctype'] = _("Amlogic remote") elif fileExists("/usr/sbin/lircd"): info['boxrctype'] = _("LIRC remote") info['ovrctype'] = boxbranding.getRCType() info['ovrcname'] = boxbranding.getRCName() info['ovrcidnum'] = boxbranding.getRCIDNum() info['transcoding'] = boxbranding.getHaveTranscoding() info['multitranscoding'] = boxbranding.getHaveMultiTranscoding() info['displaytype'] = boxbranding.getDisplayType() info['updatedatestring'] = about.getUpdateDateString() info['enigmadebuglvl'] = eGetEnigmaDebugLvl() info['imagearch'] = boxbranding.getImageArch() info['imagefolder'] = boxbranding.getImageFolder() info['imagefilesystem'] = boxbranding.getImageFileSystem() info['feedsurl'] = boxbranding.getFeedsUrl() info['developername'] = boxbranding.getDeveloperName() info['builddatestring'] = about.getBuildDateString() info['imagefpu'] = boxbranding.getImageFPU() info['havemultilib'] = boxbranding.getHaveMultiLib() try: info['fp_version'] = getFPVersion() except: # noqa: E722 info['fp_version'] = None info['tuners'] = [] for i in list(range(0, nimmanager.getSlotCount())): print( "[OpenWebif] -D- tuner '%d' '%s' '%s'" % (i, nimmanager.getNimName(i), nimmanager.getNim(i).getSlotName())) info['tuners'].append({ "name": nimmanager.getNim(i).getSlotName(), "type": nimmanager.getNimName(i) + " (" + nimmanager.getNim(i).getFriendlyType() + ")", "rec": "", "live": "" }) info['ifaces'] = [] ifaces = iNetwork.getConfiguredAdapters() for iface in ifaces: info['ifaces'].append({ "name": iNetwork.getAdapterName(iface), "friendlynic": getFriendlyNICChipSet(iface), "linkspeed": getLinkSpeed(iface), "mac": iNetwork.getAdapterAttribute(iface, "mac"), "dhcp": iNetwork.getAdapterAttribute(iface, "dhcp"), "ipv4method": getIPv4Method(iface), "ip": formatIp(iNetwork.getAdapterAttribute(iface, "ip")), "mask": formatIp(iNetwork.getAdapterAttribute(iface, "netmask")), "v4prefix": sum([ bin(int(x)).count('1') for x in formatIp( iNetwork.getAdapterAttribute(iface, "netmask")).split('.') ]), "gw": formatIp(iNetwork.getAdapterAttribute(iface, "gateway")), "ipv6": getAdapterIPv6(iface)['addr'], "ipmethod": getIPMethod(iface), "firstpublic": getAdapterIPv6(iface)['firstpublic'] }) info['hdd'] = [] for hdd in harddiskmanager.hdd: dev = hdd.findMount() if dev: stat = os.statvfs(dev) free = stat.f_bavail * stat.f_frsize / 1048576. else: free = -1 if free <= 1024: free = "%i %s" % (free, _("MB")) else: free = free / 1024. free = "%.1f %s" % (free, _("GB")) size = hdd.diskSize() * 1000000 / 1048576. if size > 1048576: size = "%.1f %s" % ((size / 1048576.), _("TB")) elif size > 1024: size = "%.1f %s" % ((size / 1024.), _("GB")) else: size = "%d %s" % (size, _("MB")) iecsize = hdd.diskSize() # Harddisks > 1000 decimal Gigabytes are labelled in TB if iecsize > 1000000: iecsize = (iecsize + 50000) // float(100000) / 10 # Omit decimal fraction if it is 0 if (iecsize % 1 > 0): iecsize = "%.1f %s" % (iecsize, _("TB")) else: iecsize = "%d %s" % (iecsize, _("TB")) # Round harddisk sizes beyond ~300GB to full tens: 320, 500, 640, 750GB elif iecsize > 300000: iecsize = "%d %s" % (((iecsize + 5000) // 10000 * 10), _("GB")) # ... be more precise for media < ~300GB (Sticks, SSDs, CF, MMC, ...): 1, 2, 4, 8, 16 ... 256GB elif iecsize > 1000: iecsize = "%d %s" % (((iecsize + 500) // 1000), _("GB")) else: iecsize = "%d %s" % (iecsize, _("MB")) info['hdd'].append({ "model": hdd.model(), "capacity": size, "labelled_capacity": iecsize, "free": free, "mount": dev, "friendlycapacity": _("%s free / %s total") % (free, size + ' ("' + iecsize + '")') }) info['shares'] = [] autofiles = ('/etc/auto.network', '/etc/auto.network_vti') for autofs in autofiles: if fileExists(autofs): method = "autofs" for line in open(autofs).readlines(): if not line.startswith('#'): # Replace escaped spaces that can appear inside credentials with underscores # Not elegant but we wouldn't want to expose credentials on the OWIF anyways tmpline = line.replace("\ ", "_") tmp = tmpline.split() if not len(tmp) == 3: continue name = tmp[0].strip() type = "unknown" if "cifs" in tmp[1]: # Linux still defaults to SMBv1 type = "SMBv1.0" settings = tmp[1].split(",") for setting in settings: if setting.startswith("vers="): type = setting.replace("vers=", "SMBv") elif "nfs" in tmp[1]: type = "NFS" # Default is r/w mode = _("r/w") settings = tmp[1].split(",") for setting in settings: if setting == "ro": mode = _("r/o") uri = tmp[2] parts = [] parts = tmp[2].split(':') if parts[0] == "": server = uri.split('/')[2] uri = uri.strip()[1:] else: server = parts[0] ipaddress = None if server: # Will fail on literal IPs try: # Try IPv6 first, as will Linux if has_ipv6: tmpaddress = None tmpaddress = getaddrinfo(server, 0, AF_INET6) if tmpaddress: ipaddress = "[" + list( tmpaddress)[0][4][0] + "]" # Use IPv4 if IPv6 fails or is not present if ipaddress is None: tmpaddress = None tmpaddress = getaddrinfo(server, 0, AF_INET) if tmpaddress: ipaddress = list(tmpaddress)[0][4][0] except: # noqa: E722 pass friendlyaddress = server if ipaddress is not None and not ipaddress == server: friendlyaddress = server + " (" + ipaddress + ")" info['shares'].append({ "name": name, "method": method, "type": type, "mode": mode, "path": uri, "host": server, "ipaddress": ipaddress, "friendlyaddress": friendlyaddress }) # TODO: fstab info['EX'] = '' if session: try: # gets all current stream clients for images using eStreamServer # TODO: merge eStreamServer and streamList # TODO: get tuner info for streams # TODO: get recoding/timer info if more than one info['streams'] = [] try: from enigma import eStreamServer streamServer = eStreamServer.getInstance() if streamServer is not None: for x in streamServer.getConnectedClients(): servicename = ServiceReference( x[1]).getServiceName() or "(unknown service)" if int(x[2]) == 0: strtype = "S" else: strtype = "T" info['streams'].append({ "ref": x[1], "name": servicename, "ip": x[0], "type": strtype }) except Exception as error: print("[OpenWebif] -D- no eStreamServer %s" % error) recs = NavigationInstance.instance.getRecordings() if recs: # only one stream and only TV from Plugins.Extensions.OpenWebif.controllers.stream import streamList s_name = '' # s_cip = '' print("[OpenWebif] -D- streamList count '%d'" % len(streamList)) if len(streamList) == 1: from Screens.ChannelSelection import service_types_tv # from enigma import eEPGCache # epgcache = eEPGCache.getInstance() serviceHandler = eServiceCenter.getInstance() services = serviceHandler.list( eServiceReference('%s ORDER BY name' % (service_types_tv))) channels = services and services.getContent("SN", True) s = streamList[0] srefs = s.ref.toString() for channel in channels: if srefs == channel[0]: s_name = channel[1] + ' (' + s.clientIP + ')' break print("[OpenWebif] -D- s_name '%s'" % s_name) # only for debug for stream in streamList: srefs = stream.ref.toString() print("[OpenWebif] -D- srefs '%s'" % srefs) sname = '' timers = [] for timer in NavigationInstance.instance.RecordTimer.timer_list: if timer.isRunning() and not timer.justplay: timers.append( removeBad(timer.service_ref.getServiceName())) print("[OpenWebif] -D- timer '%s'" % timer.service_ref.getServiceName()) # TODO: more than one recording if len(timers) == 1: sname = timers[0] if sname == '' and s_name != '': sname = s_name print("[OpenWebif] -D- recs count '%d'" % len(recs)) for rec in recs: feinfo = rec.frontendInfo() frontendData = feinfo and feinfo.getAll(True) if frontendData is not None: cur_info = feinfo.getTransponderData(True) if cur_info: nr = frontendData['tuner_number'] info['tuners'][nr]['rec'] = getOrbitalText( cur_info) + ' / ' + sname service = session.nav.getCurrentService() if service is not None: sname = service.info().getName() feinfo = service.frontendInfo() frontendData = feinfo and feinfo.getAll(True) if frontendData is not None: cur_info = feinfo.getTransponderData(True) if cur_info: nr = frontendData['tuner_number'] info['tuners'][nr]['live'] = getOrbitalText( cur_info) + ' / ' + sname except Exception as error: info['EX'] = error info['timerpipzap'] = False info['timerautoadjust'] = False try: timer = RecordTimerEntry('', 0, 0, '', '', 0) if hasattr(timer, "pipzap"): info['timerpipzap'] = True if hasattr(timer, "autoadjust"): info['timerautoadjust'] = True except Exception as error: print("[OpenWebif] -D- RecordTimerEntry check %s" % error) STATICBOXINFO = info return info
def getAboutText(): AboutText = "" AboutText += _("Model:\t %s %s\n") % (getMachineBrand(), getMachineName()) bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t\t%s\n") % (bootloader) if about.getChipSetString() != _("unavailable"): if about.getIsBroadcom(): AboutText += _("Chipset:\t BCM%s\n") % str( about.getChipSetString().upper()) else: AboutText += _("Chipset:\t %s\n") % str( about.getChipSetString().upper()) bogoMIPS = "" if path.exists('/proc/cpuinfo'): f = open('/proc/cpuinfo', 'r') temp = f.readlines() f.close() try: for lines in temp: lisp = lines.split(': ') if lisp[0].startswith('BogoMIPS'): bogoMIPS = "" + str(int(float(lisp[1].replace('\n', '')))) + "" #bogoMIPS = "" + lisp[1].replace('\n','') + "" break except: pass cpuMHz = "" if getMachineBuild() in ('vusolo4k', 'vuultimo4k', 'vuzero4k'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex', 'tiviaraplus'): cpuMHz = " (1,3 GHz)" elif getMachineBuild() in ('u51', 'u5', 'u53', 'u52', 'u5pvr', 'h9'): cpuMHz = " (1,6 GHz)" elif getMachineBuild() in ('vuuno4kse', 'vuuno4k', 'dm900', 'dm920', 'gb7252', 'dags7252', 'xc7439', '8100s'): cpuMHz = " (1,7 GHz)" elif getMachineBuild() in ('alien5'): cpuMHz = " (2,0 GHz)" elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51', 'sf4008', 'vs1500', 'h7'): try: import binascii f = open( '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb') clockfrequency = f.read() f.close() cpuMHz = " (%s MHz)" % str( round(int(binascii.hexlify(clockfrequency), 16) / 1000000, 1)) except: cpuMHz = " (1,7 GHz)" else: if path.exists('/proc/cpuinfo'): f = open('/proc/cpuinfo', 'r') temp = f.readlines() f.close() try: for lines in temp: lisp = lines.split(': ') if lisp[0].startswith('cpu MHz'): #cpuMHz = " (" + lisp[1].replace('\n', '') + " MHz)" cpuMHz = " (" + str( int(float(lisp[1].replace('\n', '')))) + " MHz)" break except: pass openLD = "OpenLD " AboutText += _("CPU:\t %s") % str( about.getCPUString()) + cpuMHz + " " + str( about.getCpuCoresString2()) + "\n" AboutText += _("Cores:\t %s") % str(about.getCpuCoresString()) + "\n" imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(22) image = f.read(1) f.close() if bootname: bootname = " (%s)" % bootname AboutText += _( "Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n" elif path.exists('/boot/cmdline.txt'): f = open('/boot/cmdline.txt', 'r') f.seek(38) image = f.read(1) f.close() if bootname: bootname = " (%s)" % bootname AboutText += _( "Selected Image:\t%s") % "STARTUP_" + image + bootname + "\n" AboutText += _("Architecture:\t %s") % str(about.getCPUArch()) + "\n" AboutText += _("BogoMIPS:\t %s") % bogoMIPS + "\n" AboutText += _("Firmware:\t %s") % openLD + str(getImageVersion()) + "\n" #AboutText += _("Build:\t %s") % getImageBuild() + "\n" #AboutText += _("Image Type:\t%s\n") % getImageType() + "\n" AboutText += _("CodeName:\t %s") % getImageCodeName() + "\n" AboutText += _("Kernel:\t %s") % str(about.getKernelVersionString()) + "\n" AboutText += _("DVB drivers:\t %s") % str( about.getDriverInstalledDate()) + "\n" AboutText += _("Last update:\t %s") % MyDateConverter( str(getEnigmaVersionString())) + "\n" AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n" AboutText += _("Uptime:\t %s") % str(about.getUptimeString()) + "\n" AboutText += _("GStreamer:\t %s") % str( about.getGStreamerVersionString().replace('GStreamer', '')) + "\n" if path.exists('/usr/bin/ffmpeg'): try: AboutText += _("FFmpeg:\t %s") % str( about.getFFmpegVersionString()) + "\n" except: pass AboutText += _("Python:\t %s") % str( about.getPythonVersionString()) + "\n\n" #AboutText += _("CPU Load:\t %s") % str(about.getLoadCPUString()) + "\n" #AboutText += _("Installed:\t ") + about.getFlashDateString() + "\n" #AboutText += _("Restarts:\t %d ") % config.misc.startCounter.value + "\n\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor version: %s") % fp_version else: fp_version = _("Frontprocessor version: %d") % fp_version AboutText += fp_version + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/power/avs'): try: f = open('/proc/stb/power/avs', 'r') temp = f.read() celsius = temp[0:-1] tempinfo = celsius f.close() except: tempinfo = "" elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') temp = f.read() tempinfo = temp[:-4] f.close() except: tempinfo = "" if tempinfo and str(round(int(tempinfo.replace('\n', '')))) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temperature:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutLcdText = AboutText.replace('\t', ' ') return AboutText, AboutLcdText
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("About")) hddsplit = skin.parameters.get("AboutHddSplit", 0) model = getBoxType() procmodel = getBoxProc() stbplatform = boxbranding.getMachineBuild() AboutText = _("Hardware: ") + model + "\n" if stbplatform != model: AboutText += _("Platform: ") + stbplatform + "\n" if procmodel != model: AboutText += _("Proc model: ") + procmodel + "\n" procmodeltype = getBoxProcType() if procmodeltype is not None and procmodeltype != "unknown": AboutText += _("Hardware type: ") + procmodeltype + "\n" hwserial = getHWSerial() if hwserial is not None and hwserial != "unknown": AboutText += _("Hardware serial: ") + hwserial + "\n" if hwserial is not None and hwserial == "unknown": AboutText += _("Hardware serial: ") + about.getCPUSerial() + "\n" AboutText += _("Brand/Meta: ") + getBoxBrand() + "\n" AboutText += "\n" cpu = about.getCPUInfoString() AboutText += _("CPU: ") + cpu + "\n" AboutText += _("CPU brand: ") + about.getCPUBrand() + "\n" socfamily = boxbranding.getSoCFamily() if socfamily is not None: AboutText += _("SoC family: ") + socfamily + "\n" AboutText += _("CPU architecture: ") + about.getCPUArch() + "\n" if not boxbranding.getDisplayType().startswith(' '): AboutText += "\n" AboutText += _("Display type: ") + boxbranding.getDisplayType() + "\n" # [WanWizard] Removed until we find a reliable way to determine the installation date # AboutText += _("Installed: ") + about.getFlashDateString() + "\n" EnigmaVersion = about.getEnigmaVersionString() EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2) if len(EnigmaVersion) == 3: EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[2] + "-" + EnigmaVersion[1] + ")" else: EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")" EnigmaVersion = _("Enigma2 version: ") + EnigmaVersion self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += "\n" + EnigmaVersion + "\n" AboutText += _("Last update: ") + about.getUpdateDateString() + "\n" AboutText += _("Enigma2 (re)starts: %d\n") % config.misc.startCounter.value AboutText += _("Enigma2 debug level: %d\n") % eGetEnigmaDebugLvl() if fileExists("/etc/openvision/mediaservice"): mediaservice = open("/etc/openvision/mediaservice", "r").read().strip() AboutText += _("Media service: ") + mediaservice.replace("enigma2-plugin-systemplugins-","") + "\n" AboutText += "\n" AboutText += _("Drivers version: ") + about.getDriverInstalledDate() + "\n" AboutText += _("Kernel version: ") + boxbranding.getKernelVersion() + "\n" GStreamerVersion = _("GStreamer version: ") + about.getGStreamerVersionString(cpu).replace("GStreamer","") self["GStreamerVersion"] = StaticText(GStreamerVersion) AboutText += "\n" + GStreamerVersion + "\n" FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString() self["FFmpegVersion"] = StaticText(FFmpegVersion) AboutText += FFmpegVersion + "\n" AboutText += "\n" AboutText += _("Python version: ") + about.getPythonVersionString() + "\n" AboutText += "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %s") % fp_version AboutText += fp_version + "\n" self["FPVersion"] = StaticText(fp_version) AboutText += _('Skin & Resolution: %s (%sx%s)\n') % (config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height()) self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" AboutText += _("Detected NIMs:") + "\n" nims = nimmanager.nimListCompressed() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" AboutText += _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)" for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.Totalfree()/1024.0, "G", _("free")) else: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.Totalfree(), "M", _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo + "\n\n" + _("Network Info:") for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\n" + x[0] + ": " + x[1] AboutText += '\n\n' + _("Uptime") + ": " + about.getBoxUptime() self["AboutScrollLabel"] = ScrollLabel(AboutText) self["key_green"] = Button(_("Translations")) self["key_red"] = Button(_("Latest Commits")) self["key_yellow"] = Button(_("Troubleshoot")) self["key_blue"] = Button(_("Memory Info")) self["actions"] = ActionMap(["ColorActions", "SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "red": self.showCommits, "green": self.showTranslationInfo, "blue": self.showMemoryInfo, "yellow": self.showTroubleshoot, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("About")) hddsplit = skin.parameters.get("AboutHddSplit", 0) procmodel = getBoxProc() AboutText = _("Hardware: ") + about.getHardwareTypeString() + "\n" if procmodel != about.getHardwareTypeString(): AboutText += _("Proc model: ") + procmodel + "\n" if fileExists("/proc/stb/info/sn"): hwserial = open("/proc/stb/info/sn", "r").read().strip() AboutText += _("Hardware serial: ") + hwserial + "\n" AboutText += _("Brand: ") + about.getHardwareBrand() + "\n" cpu = about.getCPUInfoString() AboutText += _("CPU: ") + cpu + "\n" AboutText += _("CPU brand: ") + about.getCPUBrand() + "\n" AboutText += _("CPU architecture: ") + about.getCPUArch() + "\n" if boxbranding.getImageFPU() != "": AboutText += _("FPU: ") + boxbranding.getImageFPU() + "\n" AboutText += _( "Image architecture: ") + boxbranding.getImageArch() + "\n" if boxbranding.getImageArch() == "aarch64": if boxbranding.getHaveMultiLib() == "True": AboutText += _("MultiLib: ") + _("Yes") + "\n" else: AboutText += _("MultiLib: ") + _("No") + "\n" AboutText += _("Flash type: ") + about.getFlashType() + "\n" AboutText += "\n" + _("Image: ") + about.getImageTypeString() + "\n" AboutText += _("Feed URL: ") + boxbranding.getFeedsUrl() + "\n" AboutText += _( "Open Vision version: ") + about.getVisionVersion() + "\n" AboutText += _( "Open Vision revision: ") + about.getVisionRevision() + "\n" AboutText += _("Open Vision module: ") + about.getVisionModule() + "\n" AboutText += _("Build date: ") + about.getBuildDateString() + "\n" AboutText += _("Last update: ") + about.getUpdateDateString() + "\n" # [WanWizard] Removed until we find a reliable way to determine the installation date # AboutText += _("Installed: ") + about.getFlashDateString() + "\n" EnigmaVersion = about.getEnigmaVersionString() EnigmaVersion = EnigmaVersion.rsplit("-", EnigmaVersion.count("-") - 2) if len(EnigmaVersion) == 3: EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[ 2] + "-" + EnigmaVersion[1] + ")" else: EnigmaVersion = EnigmaVersion[0] + " (" + EnigmaVersion[1] + ")" EnigmaVersion = _("Enigma version: ") + EnigmaVersion self["EnigmaVersion"] = StaticText(EnigmaVersion) AboutText += "\n" + EnigmaVersion + "\n" AboutText += _( "Enigma (re)starts: %d\n") % config.misc.startCounter.value AboutText += _("Enigma debug level: %d\n") % eGetEnigmaDebugLvl() AboutText += "\n" + _( "Kernel version: ") + about.getKernelVersionString() + "\n" AboutText += _( "DVB driver version: ") + about.getDriverInstalledDate() + "\n" AboutText += _("DVB API: ") + about.getDVBAPI() + "\n" if fileExists("/usr/bin/dvb-fe-tool"): import time try: cmd = 'dvb-fe-tool > /tmp/dvbfetool.txt' res = Console().ePopen(cmd) time.sleep(0.1) except: pass if fileExists("/tmp/dvbfetool.txt"): if fileHas("/tmp/dvbfetool.txt", "DVBC") or fileHas( "/tmp/dvbfetool.txt", "DVB-C"): AboutText += _("DVB-C: ") + _("Yes") + "\n" else: AboutText += _("DVB-C: ") + _("No") + "\n" if fileHas("/tmp/dvbfetool.txt", "DVBS") or fileHas( "/tmp/dvbfetool.txt", "DVB-S"): AboutText += _("DVB-S: ") + _("Yes") + "\n" else: AboutText += _("DVB-S: ") + _("No") + "\n" if fileHas("/tmp/dvbfetool.txt", "DVBT") or fileHas( "/tmp/dvbfetool.txt", "DVB-T"): AboutText += _("DVB-T: ") + _("Yes") + "\n" else: AboutText += _("DVB-T: ") + _("No") + "\n" if fileHas("/tmp/dvbfetool.txt", "MULTISTREAM"): AboutText += _("Multistream: ") + _("Yes") + "\n" else: AboutText += _("Multistream: ") + _("No") + "\n" if fileHas("/tmp/dvbfetool.txt", "ANNEX_A") or fileHas( "/tmp/dvbfetool.txt", "ANNEX-A"): AboutText += _("ANNEX-A: ") + _("Yes") + "\n" else: AboutText += _("ANNEX-A: ") + _("No") + "\n" if fileHas("/tmp/dvbfetool.txt", "ANNEX_B") or fileHas( "/tmp/dvbfetool.txt", "ANNEX-B"): AboutText += _("ANNEX-B: ") + _("Yes") + "\n" else: AboutText += _("ANNEX-B: ") + _("No") + "\n" if fileHas("/tmp/dvbfetool.txt", "ANNEX_C") or fileHas( "/tmp/dvbfetool.txt", "ANNEX-C"): AboutText += _("ANNEX-C: ") + _("Yes") + "\n" else: AboutText += _("ANNEX-C: ") + _("No") + "\n" GStreamerVersion = _("GStreamer version: " ) + about.getGStreamerVersionString(cpu).replace( "GStreamer", "") self["GStreamerVersion"] = StaticText(GStreamerVersion) AboutText += "\n" + GStreamerVersion + "\n" FFmpegVersion = _("FFmpeg version: ") + about.getFFmpegVersionString() self["FFmpegVersion"] = StaticText(FFmpegVersion) AboutText += FFmpegVersion + "\n" AboutText += _( "Python version: ") + about.getPythonVersionString() + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" else: fp_version = _("Frontprocessor version: %s") % fp_version AboutText += fp_version + "\n" self["FPVersion"] = StaticText(fp_version) if boxbranding.getHaveTranscoding() != "": AboutText += _("Transcoding: ") + _("Yes") + "\n" else: AboutText += _("Transcoding: ") + _("No") + "\n" if boxbranding.getHaveMultiTranscoding() != "": AboutText += _("MultiTranscoding: ") + _("Yes") + "\n" else: AboutText += _("MultiTranscoding: ") + _("No") + "\n" AboutText += _('Skin & Resolution: %s (%sx%s)\n') % ( config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height()) self["TunerHeader"] = StaticText(_("Detected NIMs:")) AboutText += "\n" + _("Detected NIMs:") + "\n" nims = nimmanager.nimListCompressed() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") AboutText += nims[count] + "\n" self["HDDHeader"] = StaticText(_("Detected HDD:")) AboutText += "\n" + _("Detected HDD:") + "\n" hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: formatstring = hddsplit and "%s:%s, %.1f %sB %s" or "%s\n(%s, %.1f %sB %s)" for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free() / 1024.0, "G", _("free")) else: hddinfo += formatstring % (hdd.model(), hdd.capacity(), hdd.free(), "M", _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) AboutText += hddinfo + "\n\n" + _("Network Info:") for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\n" + x[0] + ": " + x[1] self["AboutScrollLabel"] = ScrollLabel(AboutText) self["key_green"] = Button(_("Translations")) self["key_red"] = Button(_("Latest Commits")) self["key_yellow"] = Button(_("Troubleshoot")) self["key_blue"] = Button(_("Memory Info")) self["actions"] = ActionMap( ["ColorActions", "SetupActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "red": self.showCommits, "green": self.showTranslationInfo, "blue": self.showMemoryInfo, "yellow": self.showTroubleshoot, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def __init__(self, session): Screen.__init__(self, session) self.setTitle(_("About")) OpenNFRVersion = _("OpenNFR %s") % about.getImageVersionString() self["OpenNFRVersion"] = Label(OpenNFRVersion) AboutText = _("Model:\t\t%s %s\n") % (getMachineBrand(), getMachineName()) bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() AboutText += _("Bootloader:\t\t%s\n") % (bootloader) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t\t%s") % about.getChipSetString() + "\n" cpuMHz = "" if getMachineBuild() in ('u41', 'u42', 'u43'): cpuMHz = _(" (1.0 GHz)") elif getMachineBuild() in ('dags72604', 'vusolo4k', 'vuultimo4k', 'vuzero4k', 'gb72604'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('formuler1', 'triplex'): cpuMHz = " (1,3 GHz)" elif getMachineBuild() in ('gbmv200', 'u51', 'u5', 'u53', 'u52', 'u54', 'u55', 'u56', 'u5pvr', 'h9', 'h9combo', 'cc1', 'sf8008', 'sf8008m', 'hd60', 'hd61', 'i55plus', 'ustym4kpro', 'v8plus', 'multibox'): cpuMHz = " (1,6 GHz)" elif getMachineBuild() in ('vuuno4k', 'vuultimo4k', 'gb7252', 'dags7252', '8100s'): cpuMHz = " (1,7 GHz)" elif getMachineBuild() in ('alien5', 'u53'): cpuMHz = " (2,0 GHz)" elif getMachineBuild() in ('vuduo4k', ): cpuMHz = _(" (2.1 GHz)") elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51', 'sf4008', 'vs1500', 'h7', 'osmio4k', 'osmio4kplus', 'osmini4k'): try: import binascii f = open( '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb') clockfrequency = f.read() f.close() cpuMHz = " (%s MHz)" % str( round( int(binascii.hexlify(clockfrequency), 16) / 1000000, 1)) except: cpuMHz = " (1,7 GHz)" else: if path.exists('/proc/cpuinfo'): f = open('/proc/cpuinfo', 'r') temp = f.readlines() f.close() try: for lines in temp: lisp = lines.split(': ') if lisp[0].startswith('cpu MHz'): #cpuMHz = " (" + lisp[1].replace('\n', '') + " MHz)" cpuMHz = " (" + str( int(float(lisp[1].replace('\n', '')))) + " MHz)" break except: pass AboutText += _("CPU:\t\t%s") % about.getCPUString() + cpuMHz + "\n" AboutText += _("Cores:\t\t%s") % about.getCpuCoresString() + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System temperature:\t%s") % tempinfo.replace( '\n', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/power/avs'): f = open('/proc/stb/power/avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("Processor temperature:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if SystemInfo["canMultiBoot"]: slot = image = GetCurrentImage() bootmode = "" part = "eMMC slot %s" % slot if SystemInfo["canMode12"]: bootmode = "bootmode = %s" % GetCurrentImageMode() if SystemInfo["HasHiSi"] and "sda" in SystemInfo["canMultiBoot"][ slot]['device']: if slot > 4: image -= 4 else: image -= 1 part = "SDcard slot %s (%s) " % ( image, SystemInfo["canMultiBoot"][slot]['device']) AboutText += _("Selected Image:\t\t%s") % _("STARTUP_") + str( slot) + " " + part + " " + bootmode + "\n" string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) AboutText += _("Drivers:\t\t%s") % driversdate + "\n" AboutText += _("Image:\t\t%s") % about.getImageVersionString() + "\n" AboutText += _("Build:\t\t%s") % getImageBuild() + "\n" AboutText += _( "Kernel: \t\t%s") % about.getKernelVersionString() + "\n" AboutText += _("Oe-Core:\t\t%s") % getOEVersion() + "\n" AboutText += _( "Enigma (re)starts:\t%d\n") % config.misc.startCounter.value AboutText += _("FFmpeg:\t\t%s") % about.getFFmpegVersionString() + "\n" AboutText += _( "GStreamer:\t\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("Python:\t\t%s") % about.getPythonVersionString() + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Front Panel:\t\t%s") % fp_version AboutText += fp_version + "\n" else: fp_version = _("Front Panel:\t\tVersion unknown") AboutText += fp_version + "\n" if getMachineBuild() not in ('gbmv200', 'vuduo4k', 'v8plus', 'ustym4kpro', 'hd60', 'hd61', 'i55plus', 'osmio4k', 'osmio4kplus', 'h9', 'h9combo', 'vuzero4k', 'sf5008', 'et13000', 'et1x000', 'hd51', 'hd52', 'vusolo4k', 'vuuno4k', 'vuuno4kse', 'vuultimo4k', 'sf4008', 'dm820', 'dm7080', 'dm900', 'dm920', 'gb7252', 'dags7252', 'vs1500', 'h7', 'xc7439', '8100s', 'u41', 'u42', 'u43', 'u5', 'u5pvr', 'u52', 'u53', 'u54', 'u55', 'u56', 'u51', 'cc1', 'sf8008m', 'sf8008'): AboutText += _( "Installed:\t\t%s") % about.getFlashDateString() + "\n" AboutText += _( "Last Upgrade:\t\t%s") % about.getLastUpdateString() + "\n\n" self["FPVersion"] = StaticText(fp_version) AboutText += _("WWW:\t\t%s") % about.getImageUrlString() + "\n\n" AboutText += _( "based on:\t\t%s") % "www.github.com/oe-alliance" + "\n\n" # don't remove the string out of the _(), or it can't be "translated" anymore. # TRANSLATORS: Add here whatever should be shown in the "translator" about screen, up to 6 lines (use \n for newline) info = _("TRANSLATOR_INFO") if info == _("TRANSLATOR_INFO"): info = "" infolines = _("").split("\n") infomap = {} for x in infolines: l = x.split(': ') if len(l) != 2: continue (type, value) = l infomap[type] = value translator_name = infomap.get("Language-Team", "none") if translator_name == "none": translator_name = infomap.get("Last-Translator", "") self["FPVersion"] = StaticText(fp_version) self["TunerHeader"] = StaticText(_("Detected NIMs:")) nims = nimmanager.nimList() for count in range(len(nims)): if count < 4: self["Tuner" + str(count)] = StaticText(nims[count]) else: self["Tuner" + str(count)] = StaticText("") self["HDDHeader"] = StaticText(_("Detected HDD:")) hddlist = harddiskmanager.HDDList() hddinfo = "" if hddlist: for count in range(len(hddlist)): if hddinfo: hddinfo += "\n" hdd = hddlist[count][1] if int(hdd.free()) > 1024: hddinfo += "%s\n(%s, %d GB %s)" % ( hdd.model(), hdd.capacity(), hdd.free() / 1024, _("free")) else: hddinfo += "%s\n(%s, %d MB %s)" % ( hdd.model(), hdd.capacity(), hdd.free(), _("free")) else: hddinfo = _("none") self["hddA"] = StaticText(hddinfo) self["AboutScrollLabel"] = ScrollLabel(AboutText) self["actions"] = ActionMap( ["SetupActions", "ColorActions", "DirectionActions"], { "cancel": self.close, "ok": self.close, "green": self.showTranslationInfo, "up": self["AboutScrollLabel"].pageUp, "down": self["AboutScrollLabel"].pageDown })
def populate(self): def netspeed(): netspeed = "" for line in popen('ethtool eth0 |grep Speed', 'r'): line = line.strip().split(":") line = line[1].replace(' ', '') netspeed += line return str(netspeed) def netspeed_eth1(): netspeed = "" for line in popen('ethtool eth1 |grep Speed', 'r'): line = line.strip().split(":") line = line[1].replace(' ', '') netspeed += line return str(netspeed) def netspeed_ra0(): netspeed = "" for line in popen('iwconfig ra0 | grep Bit | cut -c 20-30', 'r'): line = line.strip() netspeed += line return str(netspeed) def netspeed_wlan0(): netspeed = "" for line in popen('iwconfig wlan0 | grep Bit | cut -c 20-30', 'r'): line = line.strip() netspeed += line return str(netspeed) def netspeed_wlan1(): netspeed = "" for line in popen('iwconfig wlan1 | grep Bit | cut -c 20-30', 'r'): line = line.strip() netspeed += line return str(netspeed) def freeflash(): freeflash = "" for line in popen( "df -mh / | grep -v '^Filesystem' | awk '{print $4}'", 'r'): line = line.strip() freeflash += line return str(freeflash) self["lab1"] = StaticText(_("openHDF")) self["lab2"] = StaticText(_("Support at") + " www.HDFreaks.cc") model = None AboutText = "" self["lab2"] = StaticText(_("Support @") + " www.hdfreaks.cc") AboutText += _("Model:\t%s %s - OEM Model: %s\n") % ( getMachineBrand(), getMachineName(), getBrandOEM()) if path.exists('/proc/stb/info/chipset'): AboutText += _("Chipset:\t%s") % about.getChipSetString() + "\n" cmd = 'cat /proc/cpuinfo | grep "cpu MHz" -m 1 | awk -F ": " ' + "'{print $2}'" cmd2 = 'cat /proc/cpuinfo | grep "BogoMIPS" -m 1 | awk -F ": " ' + "'{print $2}'" try: res = popen(cmd).read() res2 = popen(cmd2).read() except: res = "" res2 = "" cpuMHz = "" bootloader = "" if path.exists('/sys/firmware/devicetree/base/bolt/tag'): f = open('/sys/firmware/devicetree/base/bolt/tag', 'r') bootloader = f.readline().replace('\x00', '').replace('\n', '') f.close() BootLoaderVersion = 0 try: if bootloader: AboutText += _("Bootloader:\t%s\n") % (bootloader) BootLoaderVersion = int(bootloader[1:]) except: BootLoaderVersion = 0 if getMachineBuild() in ('vusolo4k', 'gbx34k'): cpuMHz = " (1,5 GHz)" elif getMachineBuild() in ('u41', 'u42'): cpuMHz = " (1,0 GHz)" elif getMachineBuild() in ('vuuno4k', 'dm900', 'gb7252', 'dags7252'): cpuMHz = " (1,7 GHz)" elif getMachineBuild() in ('formuler1tc', 'formuler1', 'triplex'): cpuMHz = " (1,3 GHz)" elif getMachineBuild() in ('u5', 'u51', 'u52', 'u53', 'u5pvr', 'h9', 'sf8008', 'sf8008s', 'sf8008t', 'hd60', "hd61", 'i55plus'): cpuMHz = " (1,6 GHz)" elif getMachineBuild() in ('sf5008', 'et13000', 'et1x000', 'hd52', 'hd51', 'sf4008', 'vs1500', 'h7', 'osmio4k', 'osmio4kplus', 'osmini4k'): try: import binascii f = open( '/sys/firmware/devicetree/base/cpus/cpu@0/clock-frequency', 'rb') clockfrequency = f.read() f.close() cpuMHz = "%s MHz" % str( round( int(binascii.hexlify(clockfrequency), 16) / 1000000, 1)) except: cpuMHz = "1,7 GHz" else: if path.exists('/proc/cpuinfo'): f = open('/proc/cpuinfo', 'r') temp = f.readlines() f.close() try: for lines in temp: lisp = lines.split(': ') if lisp[0].startswith('cpu MHz'): #cpuMHz = " (" + lisp[1].replace('\n', '') + " MHz)" cpuMHz = " (" + str( int(float(lisp[1].replace('\n', '')))) + " MHz)" break except: pass bogoMIPS = "" if res: cpuMHz = "" + res.replace("\n", "") + " MHz" if res2: bogoMIPS = "" + res2.replace("\n", "") if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008', 'dm900', 'h7', 'gb7252', '8100s'): AboutText += _("CPU:\t%s") % about.getCPUString() + cpuMHz + "\n" else: AboutText += _( "CPU:\t%s") % about.getCPUString() + " " + cpuMHz + "\n" dMIPS = 0 if getMachineBuild() in ('vusolo4k'): dMIPS = "10.500" elif getMachineBuild() in ('hd52', 'hd51', 'sf4008', 'dm900', 'h7', 'gb7252', '8100s'): dMIPS = "12.000" if getMachineBuild() in ('vusolo4k', 'hd51', 'hd52', 'sf4008', 'dm900', 'h7', 'gb7252', '8100s'): AboutText += _("DMIPS:\t") + dMIPS + "\n" else: AboutText += _("BogoMIPS:\t%s") % bogoMIPS + "\n" tempinfo = "" if path.exists('/proc/stb/sensors/temp0/value'): f = open('/proc/stb/sensors/temp0/value', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/fp/temp_sensor'): f = open('/proc/stb/fp/temp_sensor', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/sensors/temp/value'): f = open('/proc/stb/sensors/temp/value', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("System Temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" tempinfo = "" if path.exists('/proc/stb/fp/temp_sensor_avs'): f = open('/proc/stb/fp/temp_sensor_avs', 'r') tempinfo = f.read() f.close() elif path.exists('/proc/stb/power/avs'): f = open('/proc/stb/power/avs', 'r') tempinfo = f.read() f.close() elif path.exists('/sys/devices/virtual/thermal/thermal_zone0/temp'): try: f = open('/sys/devices/virtual/thermal/thermal_zone0/temp', 'r') tempinfo = f.read() tempinfo = tempinfo[:-4] f.close() except: tempinfo = "" elif path.exists('/proc/hisi/msp/pm_cpu'): try: for line in open('/proc/hisi/msp/pm_cpu').readlines(): line = [x.strip() for x in line.strip().split(":")] if line[0] in ("Tsensor"): temp = line[1].split("=") temp = line[1].split(" ") tempinfo = temp[2] except: tempinfo = "" if tempinfo and int(tempinfo.replace('\n', '')) > 0: mark = str('\xc2\xb0') AboutText += _("CPU Temp:\t%s") % tempinfo.replace( '\n', '').replace(' ', '') + mark + "C\n" AboutText += _("Cores:\t%s") % about.getCpuCoresString() + "\n" AboutText += _("HDF Version:\tV%s") % getImageVersion( ) + " Build #" + getImageBuild() + " based on " + getOEVersion() + "\n" AboutText += _("Kernel (Box):\t%s") % about.getKernelVersionString( ) + " (" + getBoxType() + ")" + "\n" if path.isfile("/etc/issue"): version = open("/etc/issue").readlines()[-2].upper().strip()[:-6] if path.isfile("/etc/image-version"): build = self.searchString("/etc/image-version", "^build=") version = "%s #%s" % (version, build) AboutText += _("Image:\t%s") % version + "\n" imagestarted = "" bootname = '' if path.exists('/boot/bootname'): f = open('/boot/bootname', 'r') bootname = f.readline().split('=')[1] f.close() if SystemInfo["HasRootSubdir"]: image = find_rootfssubdir("STARTUP") AboutText += _("Selected Image:\t%s" ) % "STARTUP_" + image[-1:] + bootname + "\n" elif getMachineBuild() in ('gbmv200', 'cc1', 'sf8008', 'ustym4kpro', 'beyonwizv2', "viper4k"): if path.exists('/boot/STARTUP'): f = open('/boot/STARTUP', 'r') f.seek(5) image = f.read(4) if image == "emmc": image = "1" elif image == "usb0": f.seek(13) image = f.read(1) if image == "1": image = "2" elif image == "3": image = "3" elif image == "5": image = "4" elif image == "7": image = "5" f.close() if bootname: bootname = " (%s)" % bootname AboutText += _( "Partition:\t%s") % "STARTUP_" + image + bootname + "\n" else: f = open('/boot/STARTUP', 'r') f.seek(22) image = f.read(1) f.close() if bootname: bootname = " (%s)" % bootname AboutText += _( "Partition:\t%s") % "STARTUP_" + image + bootname + "\n" if SystemInfo["HaveMultiBoot"]: MyFlashDate = about.getFlashDateString() if path.isfile("/etc/filesystems"): AboutText += _("Flashed:\t%s") % MyFlashDate + "\n" #AboutText += _("Flashed:\tMultiboot active\n") else: AboutText += _("Flashed:\t%s\n") % about.getFlashDateString() string = getDriverDate() year = string[0:4] month = string[4:6] day = string[6:8] driversdate = '-'.join((year, month, day)) gstcmd = 'opkg list-installed | grep "gstreamer1.0 -" | cut -c 16-32' gstcmd2 = os.system(gstcmd) #return (gstcmd2) AboutText += _("Drivers:\t%s") % driversdate + "\n" AboutText += _( "GStreamer:\t%s") % about.getGStreamerVersionString() + "\n" AboutText += _("FFmpeg:\t\t%s") % about.getFFmpegVersionString() + "\n" AboutText += _("Python:\t%s\n") % about.getPythonVersionString() AboutText += _("Free Flash:\t%s\n") % freeflash() AboutText += _("Skin:\t%s (%s x %s)\n") % ( config.skin.primary_skin.value.split('/')[0], getDesktop(0).size().width(), getDesktop(0).size().height()) AboutText += _("Last update:\t%s") % getEnigmaVersionString( ) + " to Build #" + getImageBuild() + "\n" AboutText += _("E2 (re)starts:\t%s\n") % config.misc.startCounter.value AboutText += _("Uptime") + ":\t" + about.getBoxUptime() + "\n" if SystemInfo["WakeOnLAN"]: if fileCheck("/proc/stb/power/wol"): WOLmode = open("/proc/stb/power/wol").read()[:-1] if fileCheck("/proc/stb/fp/wol"): WOLmode = open("/proc/stb/fp/wol").read()[:-1] AboutText += _("WakeOnLAN:\t%s\n") % WOLmode AboutText += _("Network:") eth0 = about.getIfConfig('eth0') eth1 = about.getIfConfig('eth1') ra0 = about.getIfConfig('ra0') wlan0 = about.getIfConfig('wlan0') wlan1 = about.getIfConfig('wlan1') if eth0.has_key('addr'): for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[1] + " (" + netspeed( ) + ")\n" elif eth1.has_key('addr'): for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[1] + " (" + netspeed_eth1( ) + ")\n" elif ra0.has_key('addr'): for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[1] + " (~" + netspeed_ra0( ) + ")\n" elif wlan0.has_key('addr'): for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[ 1] + " (~" + netspeed_wlan0() + ")\n" elif wlan1.has_key('addr'): for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[ 1] + " (~" + netspeed_wlan1() + ")\n" else: for x in about.GetIPsFromNetworkInterfaces(): AboutText += "\t" + x[0] + ": " + x[1] + "\n" fp_version = getFPVersion() if fp_version is None: fp_version = "" elif fp_version != 0: fp_version = _("Frontprocessor:\tVersion %s") % fp_version AboutText += fp_version + "\n" AboutLcdText = AboutText.replace('\t', ' ') self["AboutScrollLabel"] = ScrollLabel(AboutText)