Ejemplo n.º 1
0
    def __init__(self, debug=False):
        self.debug = debug

        mm = ModuleManager(settings.MODULES)
        sm = StaticManager(settings.STATICS)
        bm = BackgroundManager(settings.BACKGROUNDS)

        self.q = MZQueue(mm, sm, bm)
        self.qm = MZQueueManager(self.q)
        self.qm.start()

        Webserver.__init__(self, HOST_NAME, PORT_NUMBER)
Ejemplo n.º 2
0
from BaseHTTPServer import HTTPServer
from SocketServer import ThreadingMixIn

from musicazoo.backgroundmanager import BackgroundManager
from musicazoo.modulemanager import ModuleManager
from musicazoo.mzqueue import MZQueue, MZQueueManager
from musicazoo.staticmanager import StaticManager

HOST_NAME = ''
PORT_NUMBER = 9000

mm = ModuleManager(settings.MODULES)
sm = StaticManager(settings.STATICS)
bm = BackgroundManager(settings.BACKGROUNDS)

q = MZQueue(mm, sm, bm)
qm = MZQueueManager(q)
qm.start()


def spin(cmd, secs, freq):
    for i in range(secs * freq):
        print q.doCommand(cmd)
        time.sleep(1.0 / freq)


test = '''
Your've raised an interesting topic.  Before I can respond, I need to
replace your frequently used the term "open source", because I think
that is not a good choice of classification, because of the underlying
assumptions in it.  "Open source" refers to free/libre/swatantra