twisted demo: simple webserver
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 13 Jan 2006 02:11:07 +0000 (02:11 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 13 Jan 2006 02:11:07 +0000 (02:11 +0000)
lib/python/Plugins/web/Makefile.am [new file with mode: 0644]
lib/python/Plugins/web/__init__.py [new file with mode: 0644]
lib/python/Plugins/web/plugin.py [new file with mode: 0644]
lib/python/Plugins/web/update.png [new file with mode: 0644]

diff --git a/lib/python/Plugins/web/Makefile.am b/lib/python/Plugins/web/Makefile.am
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/web/__init__.py b/lib/python/Plugins/web/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/python/Plugins/web/plugin.py b/lib/python/Plugins/web/plugin.py
new file mode 100644 (file)
index 0000000..bdcbd05
--- /dev/null
@@ -0,0 +1,24 @@
+from enigma import *
+
+from twisted.internet import reactor
+from twisted.web2 import server, http, static
+
+def autostart():
+       print "Web startup"
+       # For example, serve the /tmp directory
+       toplevel = static.File("/tmp")
+       site = server.Site(toplevel)
+       
+       reactor.listenTCP(8080, http.HTTPFactory(site))
+
+def autoend():
+       pass
+
+def getPicturePaths():
+       return []
+
+def getPlugins():
+       return []
+       
+def getMenuRegistrationList():
+       return []
diff --git a/lib/python/Plugins/web/update.png b/lib/python/Plugins/web/update.png
new file mode 100644 (file)
index 0000000..e69de29