def main():
    """Executed on run"""

    try:
        input = raw_input
    except NameError:
        pass

    args = parse_args()

    if args.configfile:
        conffile = os.path.expanduser(args.configfile)
    else:
        conffile = default_config_location()

    conf = read_config(conffile)

    if args.quiet < 1:
        conf['verbose'] = True
    if args.verbose >= 1 and args.quiet < 1:
        conf['debug'] = True
    if args.to:
        conf['to'] = args.to
    if args.sender:
        conf['from'] = args.sender
    if args.username:
        conf['username'] = args.username
    if args.password:
        conf['password'] = args.password

    message = None
    if args.message and not args.file:
        message = args.message
    elif args.file:
        with open(args.file, 'r') as openfile:
            message = openfile.read()
    elif not sys.stdin.isatty():
        message = ''
        try:
            while True:
                message += input()
                message += '\n'
        except EOFError:
            pass

    if args.saveconf:
        try:
            with open(conffile, 'w') as fdest:
                settings = generate_config(conf)
                settings.write(fdest)
        except IOError as e:
            print(e)
        if not message:
            exit(0)

    invalid_conf = False
    try:
      elks_conn = Elks(conf)
    except KeyError:
      invalid_conf = True 

    if args.me:
        elks_conn.my_user(conf)
        exit(0)
    if args.numbers:
        if message:
            if 'all' in message:
                conf['showall'] = True
        elks_conn.my_numbers(conf)
        exit(0)

    if not message:
        print(USAGE, file=sys.stderr)
        exit(-1)

    if 2 >= args.verbose or (message[0:3][0] == 'elks'):
        print(ELK)

    if invalid_conf:
      print(USAGE, file=sys.stderr)
      print("\n\nYour configuration is invalid", file=sys.stderr)
      exit(-1)

    if args.call:
        elks_conn.make_call(conf, message)
    else:
        elks_conn.send_text(conf, message)
dataset/ETHPy150Open 46elks/elkme/elkme/main.py/main/swapped operands of `>=`