#!/usr/bin/env python
#-*- coding : utf-8 -*-

from bae.cli.client import BaeClient
import codecs
import locale
import sys
try:
    import sys
    reload(sys)
    sys.setdefaultencoding('utf-8')
    locale.setlocale(locale.LC_ALL, '')
    stream_writer = codecs.getwriter('utf-8')
    if not isinstance(sys.stdout, stream_writer):
        sys.stdout = stream_writer(sys.stdout)
        sys.stderr = stream_writer(sys.stderr)
    cli = BaeClient();
    cli.start()
except (KeyboardInterrupt, EOFError):
    print "BaeClient Cancelled"
