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/Makefile.am | 0 lib/python/Plugins/web/__init__.py | 0 lib/python/Plugins/web/plugin.py | 24 ++++++++++++++++++++++++ lib/python/Plugins/web/update.png | 0 4 files changed, 24 insertions(+) create mode 100644 lib/python/Plugins/web/Makefile.am create mode 100644 lib/python/Plugins/web/__init__.py create mode 100644 lib/python/Plugins/web/plugin.py create mode 100644 lib/python/Plugins/web/update.png (limited to 'lib/python') diff --git a/lib/python/Plugins/web/Makefile.am b/lib/python/Plugins/web/Makefile.am new file mode 100644 index 00000000..e69de29b diff --git a/lib/python/Plugins/web/__init__.py b/lib/python/Plugins/web/__init__.py new file mode 100644 index 00000000..e69de29b 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 [] diff --git a/lib/python/Plugins/web/update.png b/lib/python/Plugins/web/update.png new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3