本文整理汇总了Python中SystemInfo.SystemInfo类的典型用法代码示例。如果您正苦于以下问题:Python SystemInfo类的具体用法?Python SystemInfo怎么用?Python SystemInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SystemInfo类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setAC3Downmix
def setAC3Downmix(configElement):
open("/proc/stb/audio/ac3", "w").write(configElement.value and "downmix" or "passthrough")
if SystemInfo.get("supportPcmMultichannel", False) and not configElement.value:
SystemInfo["CanPcmMultichannel"] = True
else:
SystemInfo["CanPcmMultichannel"] = False
if can_pcm_multichannel:
config.av.pcm_multichannel.setValue(False)
示例2: setAC3Downmix
def setAC3Downmix(configElement):
f = open('/proc/stb/audio/ac3', 'w')
f.write(configElement.value and 'downmix' or 'passthrough')
f.close()
if SystemInfo.get('supportPcmMultichannel', False) and not configElement.value:
SystemInfo['CanPcmMultichannel'] = True
else:
SystemInfo['CanPcmMultichannel'] = False
if can_pcm_multichannel:
config.av.pcm_multichannel.setValue(False)
示例3: setAC3Downmix
def setAC3Downmix(configElement):
f = open("/proc/stb/audio/ac3", "w")
f.write(configElement.value)
f.close()
if SystemInfo.get("supportPcmMultichannel", False) and not configElement.value:
SystemInfo["CanPcmMultichannel"] = True
else:
SystemInfo["CanPcmMultichannel"] = False
if SystemInfo["supportPcmMultichannel"]:
config.av.pcm_multichannel.setValue(False)
示例4: setAC3Downmix
def setAC3Downmix(configElement):
f = open("/proc/stb/audio/ac3", "w")
print "[AVSwitch] setting AC3 to %s" % configElement.value and "downmix" or "passthrough"
f.write(configElement.value and "downmix" or "passthrough")
f.close()
if SystemInfo.get("supportPcmMultichannel", False) and not configElement.value:
SystemInfo["CanPcmMultichannel"] = True
else:
SystemInfo["CanPcmMultichannel"] = False
if can_pcm_multichannel:
config.av.pcm_multichannel.setValue(False)
示例5: setAC3Downmix
def setAC3Downmix(configElement):
f = open("/proc/stb/audio/ac3", "w")
if getBoxType() in ('dm900', 'dm920', 'dm7080', 'dm800'):
f.write(configElement.value)
else:
f.write(configElement.value and "downmix" or "passthrough")
f.close()
if SystemInfo.get("supportPcmMultichannel", False) and not configElement.value:
SystemInfo["CanPcmMultichannel"] = True
else:
SystemInfo["CanPcmMultichannel"] = False
if can_pcm_multichannel:
config.av.pcm_multichannel.setValue(False)
示例6: InitUsageConfig
def InitUsageConfig():
config.misc.useNTPminutes = ConfigSelection(default = "30", choices = [("30", "30" + " " +_("minutes")), ("60", _("Hour")), ("1440", _("Once per day"))])
config.misc.remotecontrol_text_support = ConfigYesNo(default = True)
config.workaround = ConfigSubsection()
config.workaround.blueswitch = ConfigSelection(default = "0", choices = [("0", _("QuickMenu/Extensions")), ("1", _("Extensions/QuickMenu"))])
config.workaround.deeprecord = ConfigYesNo(default = False)
config.usage = ConfigSubsection()
config.usage.shutdownOK = ConfigBoolean(default = True)
config.usage.shutdownNOK_action = ConfigSelection(default = "normal", choices = [("normal", _("just boot")), ("standby", _("goto standby")), ("deepstandby", _("goto deep-standby"))])
config.usage.boot_action = ConfigSelection(default = "normal", choices = [("normal", _("just boot")), ("standby", _("goto standby"))])
config.usage.showdish = ConfigSelection(default = "flashing", choices = [("flashing", _("Flashing")), ("normal", _("Not Flashing")), ("off", _("Off"))])
config.usage.multibouquet = ConfigYesNo(default = True)
config.usage.alternative_number_mode = ConfigYesNo(default = False)
def alternativeNumberModeChange(configElement):
enigma.eDVBDB.getInstance().setNumberingMode(configElement.value)
refreshServiceList()
config.usage.alternative_number_mode.addNotifier(alternativeNumberModeChange)
config.usage.servicetype_icon_mode = ConfigSelection(default = "0", choices = [("0", _("None")), ("1", _("Left from servicename")), ("2", _("Right from servicename"))])
config.usage.servicetype_icon_mode.addNotifier(refreshServiceList)
config.usage.service_icon_enable = ConfigYesNo(default = False)
config.usage.service_icon_enable.addNotifier(refreshServiceList)
config.usage.panicbutton = ConfigYesNo(default = False)
config.usage.multiepg_ask_bouquet = ConfigYesNo(default = False)
config.usage.showpicon = ConfigYesNo(default = True)
config.usage.show_dvdplayer = ConfigYesNo(default = False)
config.usage.quickzap_bouquet_change = ConfigYesNo(default = False)
config.usage.e1like_radio_mode = ConfigYesNo(default = True)
choicelist = []
for i in range(1, 11):
choicelist.append(("%d" % i, ngettext("%d second", "%d seconds", i) % i))
config.usage.infobar_timeout = ConfigSelection(default = "5", choices = [("0", _("No timeout"))] + choicelist)
config.usage.show_infobar_on_zap = ConfigYesNo(default = True)
config.usage.show_infobar_on_skip = ConfigYesNo(default = True)
config.usage.show_infobar_on_event_change = ConfigYesNo(default = False)
config.usage.show_infobar_channel_number = ConfigYesNo(default = False)
config.usage.show_infobar_lite = ConfigYesNo(default = False)
config.usage.show_infobar_channel_number = ConfigYesNo(default = False)
config.usage.show_second_infobar = ConfigSelection(default = "1", choices = [("0", _("Off")), ("1", _("Event Info")), ("2", _("2nd Infobar INFO")), ("3", _("2nd Infobar ECM"))])
config.usage.second_infobar_timeout = ConfigSelection(default = "5", choices = [("0", _("No timeout"))] + choicelist)
def showsecondinfobarChanged(configElement):
if config.usage.show_second_infobar.getValue() != "INFOBAREPG":
SystemInfo["InfoBarEpg"] = True
else:
SystemInfo["InfoBarEpg"] = False
config.usage.show_second_infobar.addNotifier(showsecondinfobarChanged, immediate_feedback = True)
config.usage.show_picon_bkgrn = ConfigSelection(default = "transparent", choices = [("transparent", _("Transparent")), ("blue", _("Blue")), ("red", _("Red")), ("black", _("Black")), ("white", _("White")), ("lightgrey", _("Light Grey")), ("grey", _("Grey"))])
config.usage.show_spinner = ConfigYesNo(default = True)
config.usage.enable_tt_caching = ConfigYesNo(default = True)
config.usage.sort_settings = ConfigYesNo(default = False)
config.usage.sort_menus = ConfigYesNo(default = False)
config.usage.sort_pluginlist = ConfigYesNo(default = True)
config.usage.sort_extensionslist = ConfigYesNo(default = False)
config.usage.movieplayer_pvrstate = ConfigYesNo(default = False)
choicelist = []
for i in (10, 30):
choicelist.append(("%d" % i, ngettext("%d second", "%d seconds", i) % i))
for i in (60, 120, 300, 600, 1200, 1800):
m = i / 60
choicelist.append(("%d" % i, ngettext("%d minute", "%d minutes", m) % m))
for i in (3600, 7200, 14400):
h = i / 3600
choicelist.append(("%d" % i, ngettext("%d hour", "%d hours", h) % h))
config.usage.hdd_standby = ConfigSelection(default = "300", choices = [("0", _("No standby"))] + choicelist)
config.usage.hdd_timer = ConfigYesNo(default = False)
config.usage.output_12V = ConfigSelection(default = "do not change", choices = [
("do not change", _("Do not change")), ("off", _("Off")), ("on", _("On")) ])
config.usage.pip_zero_button = ConfigSelection(default = "standard", choices = [
("standard", _("Standard")), ("swap", _("Swap PiP and main picture")),
("swapstop", _("Move PiP to main picture")), ("stop", _("Stop PiP")) ])
if not os.path.exists(resolveFilename(SCOPE_HDD)):
try:
os.mkdir(resolveFilename(SCOPE_HDD),0755)
except:
pass
config.usage.default_path = ConfigText(default = resolveFilename(SCOPE_HDD))
if not config.usage.default_path.getValue().endswith('/'):
tmpvalue = config.usage.default_path.getValue()
config.usage.default_path.setValue(tmpvalue + '/')
config.usage.default_path.save()
def defaultpathChanged(configElement):
if not config.usage.default_path.getValue().endswith('/'):
tmpvalue = config.usage.default_path.getValue()
config.usage.default_path.setValue(tmpvalue + '/')
config.usage.default_path.save()
config.usage.default_path.addNotifier(defaultpathChanged, immediate_feedback = False)
config.usage.timer_path = ConfigText(default = "<default>")
#.........这里部分代码省略.........