#!/usr/bin/python3
#
#

""" 
    OOLIB test bot.

"""

## basic imports

import warnings
import logging
import time
import sys
import os

warnings.simplefilter("ignore", UserWarning)

## 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) 
    e = bot.handle_once() 
    e.wait()
              
if __name__ == "__main__":
    from oolib import error
    try: main()
    except: error()
    try: sys.stdout.flush()
    except: pass
    os._exit(0)
