Hallo Zusammen,
ich bin Anfänger in Python auf der Enigma... Ich habe bissher nur Python auf der Raspberry geschieben... und habe etwas Sartschwierigkeiten mit den Grafischen Opjekten.
Ihad.tv haben ja ein Super Tutorial... allerdings fehlt mir der Autostart.
der Autostart geht, ich sehe im Teminal das "Startup"-Print.
Wie rufe ich jetzt HalloWorldScree auf, um ein Pop Up mit Textinhalt zu bekommen?
Viele Grüße
--------------------------------
from Screens.Screen import Screen
from Components.Label import Label
from Components.ActionMap import ActionMap
from Plugins.Plugin import PluginDescriptor
###########################################################################
class HalloWorldScreen(Screen):
skin = """
<screen position="130,150" size="460,150" title="Ihad.tv e2-tutorial lesson 1" >
<widget name="myLabel" position="10,60" size="200,40" font="Regular;20"/>
</screen>"""
def __init__(self, session, args = None):
self.session = session
Screen.__init__(self, session)
self["myLabel"] = Label(_("Hello World ;-)"))
self["myActionMap"] = ActionMap(["SetupActions"],
{
"cancel": self.close # add the RC Command "cancel" to close your Screen
}, -1)
###########################################################################
def main(session, **kwargs):
print "\n[Hallo World] start\n"
session.open(HalloWorldScreen)
def autostart(reason, **kwargs):
print "................................................................startup........................................................."
###########################################################################
def Plugins(**kwargs):
return [
PluginDescriptor( where = PluginDescriptor.WHERE_AUTOSTART, fnc = autostart),
PluginDescriptor(name="011 View a picture 2", description="Example Plugin", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)
]