1 import beacon
, httpserver
, ConfigParser
, os
, sys
3 config
= ConfigParser
.ConfigParser()
4 p
= os
.path
.dirname(__file__
)
5 config
.read(os
.path
.join(p
, 'pyTivo.conf'))
7 port
= config
.get('Server', 'Port')
9 httpd
= httpserver
.TivoHTTPServer(('', int(port
)), httpserver
.TivoHTTPHandler
)
11 for section
in config
.sections():
12 if not section
== 'Server':
13 httpd
.add_container(section
, config
.get(section
, 'type'), config
.get(section
, 'path'))
16 b
.add_service('TiVoMediaServer:' + str(port
) + '/http')
21 except KeyboardInterrupt: