For example if I have a python script test.py
containing
import time
print 'foo'
time.sleep(5)
print 'bar'
time.sleep(5)
and a shell script run_test.sh
containing
#!/usr/bin/env bash
python test.py
then running the latter (using the Run menu item for example) from within PyCharm (2016.1) prints no output until the entire script has completed (after about 10 seconds).
Is there a way to print output as my shell script runs?