the missing plugin
[enigma2.git] / mytest.py
index 391eda9f668dd2a58bb24a7a96535f3a9107b7a7..522b9b395e2d96c26c18c511cc5613089f232c69 100644 (file)
--- a/mytest.py
+++ b/mytest.py
@@ -1,3 +1,4 @@
+from Tools import RedirectOutput
 from enigma import *
 from tools import *
 
@@ -21,24 +22,27 @@ InitFallbackFiles()
 eDVBDB.getInstance().reloadBouquets()
 
 try:
-       from twisted.internet import e2reactor
+       import e2reactor
        e2reactor.install()
        
        from twisted.internet import reactor
        
        def runReactor():
                reactor.run()
-except:
+except ImportError:
+       print "twisted not available"
        def runReactor():
                runMainloop()
 
 # initialize autorun plugins and plugin menu entries
 from Components.PluginComponent import plugins
-plugins.getPluginList(runAutostartPlugins=True)
+plugins.readPluginList()
+
 from Screens.Wizard import wizardManager
 from Screens.StartWizard import *
 from Screens.TutorialWizard import *
 from Tools.BoundFunction import boundFunction
+from Plugins.Plugin import PluginDescriptor
 
 had = dict()
 
@@ -267,12 +271,19 @@ def runScreenTest():
        
        session.nav = Navigation()
        
-       screensToRun = wizardManager.getWizards()
+       screensToRun = [ ]
+       
+       for p in plugins.getPlugins(PluginDescriptor.WHERE_WIZARD):
+               screensToRun.append(p.__call__)
+       
+       screensToRun += wizardManager.getWizards()
+       
        screensToRun.append(Screens.InfoBar.InfoBar)
 
        def runNextScreen(session, screensToRun, *result):
                if result:
-                       quitMainloop(result)
+                       quitMainloop(*result)
+                       return
        
                screen = screensToRun[0]
                
@@ -329,7 +340,7 @@ import Components.NimManager
 # first, setup a screen
 try:
        runScreenTest()
-       plugins.getPluginList(runAutoendPlugins=True)
+       plugins.shutdown()
 except:
        print 'EXCEPTION IN PYTHON STARTUP CODE:'
        print '-'*60