(script)
return result
Run code in the JS interpreter and return output.
Run code in the JS interpreter and return output.
Run code in the JS interpreter and return output .
def jseval(script):
    """Run code in the JS interpreter and return output."""
    try:
        interpreter = Popen(['js'], stdin=PIPE, stdout=PIPE)
    except OSError:
        return script
    result, errors = interpreter.communicate(script)
    if interpreter.poll() or errors:
        return script
    return result
def jseval ( script ) : try : interpreter = Popen ( [ 'js' ] , stdin = PIPE , stdout = PIPE ) except OSError : return script result , errors = interpreter . communicate ( script ) if interpreter . poll ( ) or errors : return script return result