I am using IDyOM's krn parser in a script that creates CSV representations of krn files. Because I am piping the output of this script into a CSV file I want to be able to dissociate printed output from warnings. The warn function writes to stderr while print writes to stdout, so using warn solves this problem. It seems appropriate to use warn anyway, since these really are warnings.
I am using IDyOM's krn parser in a script that creates CSV representations of krn files. Because I am piping the output of this script into a CSV file I want to be able to dissociate printed output from warnings. The
warn
function writes to stderr whileprint
writes to stdout, so using warn solves this problem. It seems appropriate to use warn anyway, since these really are warnings.