当前位置: 首页>>代码示例>>Python>>正文


Python SystemInfo.get方法代码示例

本文整理汇总了Python中SystemInfo.SystemInfo.get方法的典型用法代码示例。如果您正苦于以下问题:Python SystemInfo.get方法的具体用法?Python SystemInfo.get怎么用?Python SystemInfo.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SystemInfo.SystemInfo的用法示例。


在下文中一共展示了SystemInfo.get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setAC3Downmix

# 需要导入模块: from SystemInfo import SystemInfo [as 别名]
# 或者: from SystemInfo.SystemInfo import get [as 别名]
		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)
开发者ID:kajgan,项目名称:e2,代码行数:10,代码来源:AVSwitch.py

示例2: setAC3Downmix

# 需要导入模块: from SystemInfo import SystemInfo [as 别名]
# 或者: from SystemInfo.SystemInfo import get [as 别名]
 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)
开发者ID:kingvuplus,项目名称:PE-repos,代码行数:12,代码来源:AVSwitch.py

示例3: setAC3Downmix

# 需要导入模块: from SystemInfo import SystemInfo [as 别名]
# 或者: from SystemInfo.SystemInfo import get [as 别名]
	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)
开发者ID:OpenViX,项目名称:enigma2,代码行数:12,代码来源:AVSwitch.py

示例4: setAC3Downmix

# 需要导入模块: from SystemInfo import SystemInfo [as 别名]
# 或者: from SystemInfo.SystemInfo import get [as 别名]
		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)
开发者ID:popazerty,项目名称:e2-gui,代码行数:13,代码来源:AVSwitch.py

示例5: setAC3Downmix

# 需要导入模块: from SystemInfo import SystemInfo [as 别名]
# 或者: from SystemInfo.SystemInfo import get [as 别名]
		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)
开发者ID:OpenESI,项目名称:Gui,代码行数:15,代码来源:AVSwitch.py

示例6: InitUsageConfig

# 需要导入模块: from SystemInfo import SystemInfo [as 别名]
# 或者: from SystemInfo.SystemInfo import get [as 别名]
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>")
#.........这里部分代码省略.........
开发者ID:Nobody28,项目名称:enigma2,代码行数:103,代码来源:UsageConfig.py


注:本文中的SystemInfo.SystemInfo.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。