def run():
    sh = Shell()
    print """
Welcome to the Interactive dreadnought-js shell version %s"

This is a simple javascript shell that lets you explore the dreadnought 
API.

 
To enter multiline statements end the line with '\\', so 
   var x = \\
     {\\
        a: 10\\
     };
   gets evaluated as 'var x = { a: 10 };'


To exit the shell press Control-D:


""" % Version

    buf = ""
    while True:
        try:
            if len(buf) == 0: 
                prompt = ">"
            else:
                prompt = " "

            line = raw_input( prompt )
        except EOFError:
            break

        if len(line) == 0:
            continue

        elif line[-1] == '\\':
            buf += line[:-1]
        elif len(buf) > 0:
            buf += line
            sh.evaluate(buf)
            buf = ""
        else:
            try: 
                sh.evaluate(line)
            except:
                print sys.exc_info()[1]
dataset/ETHPy150Open dschere/dreadnought-js/dnshell.py/run/original