Ejemplo n.º 1
0
Archivo: cli.py Proyecto: hoh/Vega
def main():
    interface = CLIInterface()
    generator = FixedIntervalGenerator()
    mixer = AdditionMixer(generator)
    encryption = DummyEncryption()
    emitter = DummyEmitter()

    contacts = TestContacts()

    interface.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    interface.contacts = contacts
    generator.contacts = contacts

    mixer.start_loop()
    interface.run()
Ejemplo n.º 2
0
def main():
    adapter = PidginDBusAdapter()

    generator = FixedIntervalGenerator()
    mixer = AdditionMixer(generator)
    encryption = ClearTextEncryption()
    emitter = adapter

    contacts = TestContacts()

    adapter.output = mixer
    generator.output = mixer
    mixer.output = encryption
    encryption.output = emitter

    adapter.contacts = contacts
    generator.contacts = contacts

    print('foo')
    mixer.loop()
    #mixer.start_loop()
    adapter.run()