本文整理汇总了Python中Screens.ScanSetup.ScanSetup.createSetup方法的典型用法代码示例。如果您正苦于以下问题:Python ScanSetup.createSetup方法的具体用法?Python ScanSetup.createSetup怎么用?Python ScanSetup.createSetup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Screens.ScanSetup.ScanSetup
的用法示例。
在下文中一共展示了ScanSetup.createSetup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createSetup
# 需要导入模块: from Screens.ScanSetup import ScanSetup [as 别名]
# 或者: from Screens.ScanSetup.ScanSetup import createSetup [as 别名]
def createSetup(self):
ScanSetup.createSetup(self)
#manipulate "config", remove "self.scan_networkScan", "self.scan_clearallservices" and "self.scan_onlyfree"
tlist = self["config"].getList()
for x in (self.scan_networkScan, self.scan_clearallservices, self.scan_onlyfree):
for y in tlist:
if x == y[1]:
tlist.remove(y)
self["config"].list = tlist
self["config"].l.setList(tlist)
#manipulate choices, we need only "single_transponder","predefined_transponder"
for scan_type in (self.scan_type, self.scan_typecable, self.scan_typeterrestrial, self.scan_typeatsc):
slist = scan_type.choices.choices
dlist = []
for x in slist:
if x[0] in ("single_transponder","predefined_transponder"):
dlist.append(x)
scan_type.choices.choices = dlist