コード例 #1
0
ファイル: termbot.py プロジェクト: goudacoin/twobitbot
def main():
    configure.setup_logs()

    try:
        config = configure.load_config()
    except IOError as e:
        log.critical("Aborting, problem loading config: {0}".format(e), exc_info=True)
        sys.exit(1)

    bot = TerminalBot(config)
    stdio.StandardIO(bot)

    reactor.run()
コード例 #2
0
ファイル: bot.py プロジェクト: m4q4/twobitbot
def main():
    configure.setup_logs()
    # load config
    try:
        config = configure.load_config()
    except IOError as e:
        log.critical("Aborting, problem loading config: {0}".format(e), exc_info=True)
        sys.exit(1)

    # def shutdown():
    #     # add shutdown calls here...
    # reactor.addSystemEventTrigger('before', 'shutdown', shutdown)

    from twisted.internet import reactor

    factory = TwoBitBotFactory(config)

    reactor.connectTCP(config['server'], config['server_port'], factory)
    reactor.run()
コード例 #3
0
def main():
    configure.setup_logs()
    # load config
    try:
        config = configure.load_config()
    except IOError as e:
        log.critical("Aborting, problem loading config: {0}".format(e),
                     exc_info=True)
        sys.exit(1)

    # def shutdown():
    #     # add shutdown calls here...
    # reactor.addSystemEventTrigger('before', 'shutdown', shutdown)

    from twisted.internet import reactor

    factory = TwoBitBotFactory(config)

    reactor.connectTCP(config['server'], config['server_port'], factory)
    reactor.run()