This probably an easy question but I just can't seem to make it work consistently for different permutations.
What is the Python3 equivalent of this?
print >> sys.stdout, "Generated file: %s in directory %s\n" % (name+".wav", outdir)
I've tried
print("String to print %s %s\n", file=sys.stdout % (var1, var2))
and
print("String to print {} {}\n".format(var1, var2), file=sys.stdout)
What is the best way to do this in Python3 now that the >> operator is no more. I know the % () has the be within the closing parenthesis of the print function but I always have trouble when using formatting as well as printing to a specific file/stream at the same time.