This problem happens with Python/Lua/Ruby because they're compiled from their original lower-level implementations using Emscripten. Which means everything have to work synchronously and there is no way to stop execution in order to get the user's input, unless we transform the code into CPS, which will probably make it much slower.
Also, at the moment something like this doesn't work at all (Python):