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


Python ConfigList.list方法代码示例

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


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

示例1: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session):
		Screen.__init__(self, session)
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]

		for slot in range(MAX_NUM_CI):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
开发者ID:Anubisko,项目名称:enigma2,代码行数:28,代码来源:Ci.py

示例2: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session, args = 0):

		Screen.__init__(self, session)

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"ok": self.greenPressed,
				"cancel": self.close
			}, -1)

		NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				if state != -1:
					if  state == 1:
						appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
					elif state == 2:
						appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
					self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
开发者ID:Openeight,项目名称:enigma2,代码行数:36,代码来源:Ci.py

示例3: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session):
		self.skin = Volume_adjust.skin
		Screen.__init__(self, session)
		# Path of the config file
		self.filename="/etc/volume.xml"
		global offset
		offset = 0
		self["key_red"] = StaticText(_("delete"))
		self["key_green"] = StaticText(_("add Service"))
		self["key_yellow"] = StaticText(_("change"))
		self["key_blue"] = StaticText(_("add Current"))
		self["press_menu"] = StaticText(_("press the menu button to set a general AC3/Dolby offset"))
		self["ServiceList.desc"] = Label(_("Channel \t\t\tVolume +"))

		self["actions"] = ActionMap(["ColorActions","OkCancelActions","MenuActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"blue": self.bluePressed,
				"menu": self.config_menu,
				"ok": self.okPressed,
				"cancel": self.cancel
			}, -1)

		self.servicelist = []
		self.read_volume=[]
		serviceList = ConfigList(self.servicelist)
		serviceList.list = self.servicelist
		serviceList.l.setList(self.servicelist)
		self["ServiceList"] = serviceList

		self.loadXML() # load the config file
		self.onShown.append(self.setWindowTitle)
开发者ID:OUARGLA86,项目名称:enigma2,代码行数:36,代码来源:plugin.py

示例4: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
    def __init__(self, session, ci_slot="9"):

        Screen.__init__(self, session)
        self.ci_slot = ci_slot
        self.filename = "/etc/enigma2/ci" + str(self.ci_slot) + ".xml"

        self["key_red"] = StaticText(_("Delete"))
        self["key_green"] = StaticText(_("add Service"))
        self["key_yellow"] = StaticText(_("add Provider"))
        self["key_blue"] = StaticText(_("select CAId"))
        self["CAidList_desc"] = StaticText(_("assigned CAIds:"))
        self["CAidList"] = StaticText()
        self["ServiceList_desc"] = StaticText(_("assigned Services/Provider:"))
        self["ServiceList_info"] = StaticText()

        self["actions"] = ActionMap(
            ["ColorActions", "SetupActions"],
            {
                "green": self.greenPressed,
                "red": self.redPressed,
                "yellow": self.yellowPressed,
                "blue": self.bluePressed,
                "cancel": self.cancel,
            },
            -1,
        )

        print "[CI_Wizzard_Config] Configuring CI Slots : %d  " % self.ci_slot

        i = 0
        self.caidlist = []
        print eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot)
        for caid in eDVBCIInterfaces.getInstance().readCICaIds(self.ci_slot):
            i += 1
            self.caidlist.append((str(hex(int(caid))), str(caid), i))

        print "[CI_Wizzard_Config_CI%d] read following CAIds from CI: %s" % (self.ci_slot, self.caidlist)

        self.selectedcaid = []
        self.servicelist = []
        self.caids = ""

        serviceList = ConfigList(self.servicelist)
        serviceList.list = self.servicelist
        serviceList.l.setList(self.servicelist)
        self["ServiceList"] = serviceList

        self.loadXML()
        # if config mode !=advanced autoselect any caid
        if config.usage.setup_level.index <= 1:  # advanced
            self.selectedcaid = self.caidlist
            self.finishedCAidSelection(self.selectedcaid)
        self.onShown.append(self.setWindowTitle)
开发者ID:kakunbsc,项目名称:enigma2.4,代码行数:55,代码来源:plugin.py

示例5: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session, args = 0):
		self.skin = CIselectMainMenu.skin
		Screen.__init__(self, session)
		#--->
		#---<
		#+++>
		appname = ""
		#+++<	
		
		self["key_red"] = StaticText(_("Cancel"))
		self["key_green"] = StaticText(_("Config"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.redPressed,
				"yellow": self.yellowPressed,
				"ok": self.greenPressed,
				"cancel": self.cancel
			}, -1)

		NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				#--->
				#-if state == 0:
				#---<
				#+++>
				if state == 0 or state == -1:
				#+++<	
					appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
				elif state == 1:	
					appname = _("Slot %d") %(slot+1) + " - " + _("init modules")
				elif state == 2:
					appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
				self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
开发者ID:TitanNit,项目名称:tdt,代码行数:53,代码来源:plugin.py

示例6: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
    def __init__(self, session):
        Screen.__init__(self, session)

        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions", "CiSelectionActions"],
            {
                "left": self.keyLeft,
                "right": self.keyRight,
                "cancel": self.cancel,
                "green": self.reset_both,
                "yellow": self.reset_sc,
                "red": self.cancel,
                "blue": self.download,
            },
            -1,
        )

        self.list = []

        self.softcam = CamConfig("emu")
        self.cardserver = SrvConfig("crdsrv")

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self["entries"] = menuList
        self["info"] = Label("")
        self["ecmtext"] = Label("")
        self.ecm()
        self.service()
        self.onShown.append(self.openTest)
        self.mytimer = eTimer()
        self.mytimer.callback.append(self.ecm)
        self.mytimer.start(1000)

        softcams = [_("None")] + self.softcam.getList()
        cardservers = [_("None")] + self.cardserver.getList()

        self.softcams = ConfigSelection(choices=softcams)
        self.softcams.value = self.softcam.current() or _("None")
        self.cardservers = ConfigSelection(choices=cardservers)
        self.cardservers.value = self.cardserver.current() or _("None")

        self.list.append(getConfigListEntry(_("Select Cam:"), self.softcams))
        self.list.append(getConfigListEntry(_("Select Cardserver:"), self.cardservers))

        self["key_red"] = Label(_("Cancel"))
        self["key_yellow"] = Label(_("Start"))
        self["key_green"] = Label(_("Restart"))
        self["key_blue"] = Label(_("Download"))
开发者ID:pelavo,项目名称:Softcam-Panel,代码行数:52,代码来源:plugin.py

示例7: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session, args = 0):

		Screen.__init__(self, session)

		self["key_red"] = StaticText(_("Close"))
		self["key_green"] = StaticText(_("Edit"))

		self["actions"] = ActionMap(["ColorActions","SetupActions"],
			{
				"green": self.greenPressed,
				"red": self.close,
				"ok": self.greenPressed,
				"cancel": self.close
			}, -1)

		if getBoxType() in ('zgemmah9combo'):
			NUM_CI = 1
		else:
			NUM_CI = eDVBCIInterfaces.getInstance() and eDVBCIInterfaces.getInstance().getNumOfSlots()

		print "[CI_Wizzard] FOUND %d CI Slots " % NUM_CI

		self.dlg = None
		self.state = { }
		self.list = [ ]
		if  NUM_CI and NUM_CI > 0:
			for slot in range(NUM_CI):
				state = eDVBCI_UI.getInstance().getState(slot)
				if state != -1:
					appname = _("Slot %d") %(slot+1) + " - " + _("unknown error")
					if state == 0:
						appname = _("Slot %d") %(slot+1) + " - " + _("no module found")
					elif state == 1:
						appname = _("Slot %d") %(slot+1) + " - " + _("init modules")

					elif state == 2:
						appname = _("Slot %d") %(slot+1) + " - " + eDVBCI_UI.getInstance().getAppName(slot)
					self.list.append( (appname, ConfigNothing(), 0, slot) )
		else:
			self.list.append( (_("no CI slots found") , ConfigNothing(), 1, -1) )
		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["CiList"] = menuList
		self.onShown.append(self.setWindowTitle)
开发者ID:openhdf,项目名称:enigma2,代码行数:47,代码来源:plugin.py

示例8: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session):
		Screen.__init__(self, session)

		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyRight,
				"cancel": self.cancel,
				"ok": self.ok,
				"green": self.save,
				"red": self.cancel,
				"blue": self.blue,
			},-1)

		self.list = [ ]

		self.softcam = CamControl('softcam')
		self.cardserver = CamControl('cardserver')

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList

		softcams = self.softcam.getList()
		cardservers = self.cardserver.getList()

		self.softcams = ConfigSelection(choices = softcams)
		self.softcams.value = self.softcam.current()

		self.list.append(getConfigListEntry(_("Select Softcam"), self.softcams))
		if cardservers:
			self.cardservers = ConfigSelection(choices = cardservers)
			self.cardservers.value = self.cardserver.current()
			self.list.append(getConfigListEntry(_("Select Card Server"), self.cardservers))

		self.list.append(getConfigListEntry(_("Restart softcam"), ConfigAction(self.restart, "s")))
		if cardservers:
			self.list.append(getConfigListEntry(_("Restart cardserver"), ConfigAction(self.restart, "c")))
			self.list.append(getConfigListEntry(_("Restart both"), ConfigAction(self.restart, "sc")))

		self["key_red"] = Label(_("Cancel"))
		self["key_green"] = Label(_("OK"))
		self["key_blue"] = Label(_("ECM Info's"))
开发者ID:henrylicious,项目名称:test,代码行数:46,代码来源:Sc.py

示例9: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session, menu_path=""):
		Screen.__init__(self, session)
		screentitle = _("Common interface")
		if config.usage.show_menupath.value == 'large':
			menu_path += screentitle
			title = menu_path
			self["menu_path_compressed"] = StaticText("")
		elif config.usage.show_menupath.value == 'small':
			title = screentitle
			self["menu_path_compressed"] = StaticText(menu_path + " >" if not menu_path.endswith(' / ') else menu_path[:-3] + " >" or "")
		else:
			title = screentitle
			self["menu_path_compressed"] = StaticText("")
		Screen.setTitle(self, title)

		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.list = [ ]

		for slot in range(MAX_NUM_CI):
			state = eDVBCI_UI.getInstance().getState(slot)
			if state != -1:
				self.appendEntries(slot, state)
				CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

		menuList = ConfigList(self.list)
		menuList.list = self.list
		menuList.l.setList(self.list)
		self["entries"] = menuList
		self["entries"].onSelectionChanged.append(self.selectionChanged)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.layoutFinished)
开发者ID:rimasx,项目名称:enigma2,代码行数:42,代码来源:Ci.py

示例10: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
    def __init__(self, session, args = 0):
        Screen.__init__(self, session)
        self['key_red'] = StaticText(_('Close'))
        self['key_green'] = StaticText(_('Edit'))
        self['actions'] = ActionMap(['ColorActions', 'SetupActions'], {'green': self.greenPressed,
         'red': self.close,
         'ok': self.greenPressed,
         'cancel': self.close}, -1)
        NUM_CI = eDVBCIInterfaces.getInstance().getNumOfSlots()
        print '[CI_Wizzard] FOUND %d CI Slots ' % NUM_CI
        self.dlg = None
        self.state = {}
        self.list = []
        if NUM_CI > 0:
            for slot in range(NUM_CI):
                state = eDVBCI_UI.getInstance().getState(slot)
                if state == 0:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + _('no module found')
                elif state == 1:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + _('init modules')
                elif state == 2:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + eDVBCI_UI.getInstance().getAppName(slot)
                else:
                    appname = _('Slot %d') % (slot + 1) + ' - ' + 'Unknown state %d' % state
                self.list.append((appname,
                 ConfigNothing(),
                 0,
                 slot))

        else:
            self.list.append((_('no CI slots found'),
             ConfigNothing(),
             1,
             -1))
        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['CiList'] = menuList
        self.onShown.append(self.setWindowTitle)
开发者ID:kingvuplus,项目名称:ZDE-gui,代码行数:41,代码来源:plugin.py

示例11: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
    def __init__(self, session):
        Screen.__init__(self, session)
        self.setTitle(_('Common Interface'))
        self['actions'] = ActionMap(['OkCancelActions', 'CiSelectionActions'], {'left': self.keyLeft,
         'right': self.keyLeft,
         'ok': self.okbuttonClick,
         'cancel': self.cancel}, -1)
        self.dlg = None
        self.state = {}
        self.list = []
        for slot in range(MAX_NUM_CI):
            state = eDVBCI_UI.getInstance().getState(slot)
            if state != -1:
                self.appendEntries(slot, state)
                CiHandler.registerCIMessageHandler(slot, self.ciStateChanged)

        menuList = ConfigList(self.list)
        menuList.list = self.list
        menuList.l.setList(self.list)
        self['entries'] = menuList
        self['entries'].onSelectionChanged.append(self.selectionChanged)
        self['text'] = Label(_('Slot %d') % 1)
开发者ID:sodo13,项目名称:EG-gui,代码行数:24,代码来源:Ci.py

示例12: __init__

# 需要导入模块: from Components.ConfigList import ConfigList [as 别名]
# 或者: from Components.ConfigList.ConfigList import list [as 别名]
	def __init__(self, session):
		Screen.__init__(self, session)
		self.setTitle(_("Common Interface"))
		self["actions"] = ActionMap(["OkCancelActions", "CiSelectionActions"],
			{
				"left": self.keyLeft,
				"right": self.keyLeft,
				"ok": self.okbuttonClick,
				"cancel": self.cancel
			},-1)

		self.dlg = None
		self.state = { }
		self.slots = []
		self.HighBitrateEntry = {}
		self.RelevantPidsRoutingEntry = {}
		self.entryData = []

		self.list = [ ]
		self["entries"] = ConfigList(self.list)
		self["entries"].list = self.list
		self["entries"].l.setList(self.list)
		self["text"] = Label(_("Slot %d")%(1))
		self.onLayoutFinish.append(self.initialUpdate)
开发者ID:openhdf,项目名称:enigma2,代码行数:26,代码来源:Ci.py


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