Feature request #8343
Incremental output in python console
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||17127|
It would be great if the Python console showed script output as it were produced by the script, rather than waiting until the script finishes to display the output. This would allow one to monitor the progress of a script more easily. Also, if a script generates an exception, the exception is displayed at the top, above all of the output, which makes it hard to see that there has been an error if the script generates a lot of output.
UPDATE (duplicating bug because I couldn't reopen the old one #8270):
In a nightly build from a few days ago I see that exceptions are now displayed below output but I don't see incremental output. For example, when I run
import time for i in xrange(3): time.sleep(1) print i
in the console, the script waits three seconds and then prints
0 1 2
rather than waiting 1 second, printing 0, waiting another second, printing 1, etc.
Call QCoreApplication.processEvents() after writing to Python console, enabling incremental output from Python scripts. Fixes #8343.