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

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
run code in the js interpreter and return output .