#! /usr/bin/env python3.6

from js9 import j

import argparse
j.application.start("jsshell")

parser = argparse.ArgumentParser()
parser.add_argument('-q', '--quiet', default=False,
                    action='store_true', help="Turn down logging")
options, args = parser.parse_known_args()


if len(args) == 1:
    toexec = args[0]
    toexec = toexec.strip("'\" ").strip("'\" ")
    exec(toexec)
else:
    from IPython import embed
    embed()  # colors='Linux')

    j.application.stop()

