我是意大利人,对不起我的英语
我创建了一个插件,正在工作,现在我应该分配给黄色 - 蓝色键和信息(dreambox enigma2 decoder)命令 蓝色应该在shell中运行.sh文件并返回主菜单 黄色也是如此 它应该打开一个皮肤的信息按钮,一个新的信息菜单..关闭返回主菜单 *皮肤(屏幕)已包含绘制的按钮 我无法理解错误
这是列表
class OpenScript(Screen):
skin = '<screen name="main" position="212,15 etc etc >'
def __init__(self, session, args = 0):
Screen.__init__(self, session)
self.session = session
try:
list = listdir('/etc/pandasat/script')
list = [ x[:-3] for x in list if x.endswith('.sh') ]
except:
list = []
#self['key_blue'] = Label(_(' SpeedTest'))
#self['key_yellow'] = Label(_(' Update'))
#self['key_info'] = Label_' Info'))
self['version'] = Label(_('Versione %s' % Version))
self['list'] = MenuList(list)
self['actions'] = ActionMap(['OkCancelActions', 'ColorActions','WizardActions','NumberActions','EPGSelectActions'],{'ok': self.run,
#'key_save': self.run,
'key_exit': self.close,
'red': self.close,
'green': self.run,
#'info': self.ShowAbout,
#'yellow: self.update,
#'blue': self.speedtest,
'cancel': self.close}, -1)
def run(self):
script = self['list'].getCurrent()
if script is not None:
self.session.open(Console, script.replace('_', ' '), cmdlist=['/script/%s.sh' % script])
return
#def speedtest(self): ????????
#def update(self): ?????
#class AboutScreen(Screen):
# skin = '<screen name="InFo" etc etc etc </screen>'
#
罐&#39;主