When Python is directing its output to a pipe rather than straight to a terminal, it buffers its output by default. I think you can work around this by either passing the "-u" parameter when invoking Python (e.g., python -u myscript.py arg1 arg2
) to tell it not to buffer, or by calling sys.stdout.flush()
throughout your script any time you want it to make sure that the output has made it to P4V.
See also:
http://kb.perforce.com/article/914/sending-script-output-to-p4vs-custom-tool-terminal
(It looks like that question was asked and answered after you asked here on Stack Overflow. Sorry if you're already well aware of it.)