extract code from CodeMirror and run it


i’ve managed to create a CodeMirror editor and i’m succesfully getting the text written inside, however i’ve been testing with strings ans numbers. What i want actually is to write a python code inside the editor and then run it and get a result.

i.e: if i write

print "Hello stackoverflow"; 

i should get

Hello stackoverflow

as a result and not

print “Hello stackoverflow”;

as i’m getting now

how can i do that ?


That is not something CodeMirror does. You might want to look into Skulpt or Emscripten.


There is also brython.