#!/usr/bin/python3
#
#

""" 
    OOLIB test bot.

"""

## basic imports

import logging
import time
import sys
import os

## setting the python path

if not os.getcwd() in sys.path:
     sys.path.insert(0, os.getcwd())
     sys.path.insert(0, os.getcwd() + os.sep + "..")

## ============
## MAIN PROGRAM 
## ============

def main():
    from oolib import boot, fleet, core, goodmorning, hello
    config = boot()
    core.plugins.load_package("oolib.plugs")
    from oolib.drivers.line import CLIBot
    bot = CLIBot(**config) 
    event = bot.get_one()
    e = bot.do_once(event) 
    e.wait()
              
if __name__ == "__main__":
    from oolib import error
    try: main()
    except: error()
    sys.stdout.flush()
    os._exit(0)
