From 11ea75ea8a760d6043e4472b28372741faea6197 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 13 Jan 2006 02:11:07 +0000 Subject: twisted demo: simple webserver --- lib/python/Plugins/web/plugin.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/python/Plugins/web/plugin.py (limited to 'lib/python/Plugins/web/plugin.py') diff --git a/lib/python/Plugins/web/plugin.py b/lib/python/Plugins/web/plugin.py new file mode 100644 index 00000000..bdcbd058 --- /dev/null +++ b/lib/python/Plugins/web/plugin.py @@ -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 [] -- cgit v1.2.3