Fix adding extra newline when writing job traces and artifacts to stdout
The print
function will automatically add a newline at the end.
This means when job traces and artifacts get printed to the stdout
followed by an extra newline meaning it will no longer be accurate.
Instead of print
use sys.stdout
which is a file object representing
the standard output. The write
method will output the passed string
as is without any extra newlines.