RunScript vs RunPythonScript inside commands problem

Great. Here is one example that I just posted in another thread - realtime view stretching via script. Since it is using some Python, it would not work while, say, drawing a Polyline, which would be handy if this was fixed: