Answers for "python execute javascript"

23

execute command in python script

import os

os.system("ma Commande")

#Exemple:

os.system("cd Documents")
Posted by: Guest on June-10-2020
0

python run javascript

import js2py

js = """
function escramble_758(){
var a,b,c
a='+1 '
b='84-'
a+='425-'
b+='7450'
c='9'
document.write(a+c+b)
}
escramble_758()
""".replace("document.write", "return ")

result = js2py.eval_js(js)  # executing JavaScript and converting the result to python string
Posted by: Guest on July-13-2020

Code answers related to "python execute javascript"

Python Answers by Framework

Browse Popular Code Answers by Language