If I make a script called aaa.FCMacro:wmayer wrote:What exactly do you consider the executable's stdout? And where is stderr merged to stdout?Currently, both stderr and stdout from Python's are sent out of the FreeCAD executable's stdout. I think it should not merge stderr in to stdout implicitly.
Code: Select all
from __future__ import print_function
import sys
print("This is to stdout")
print("This is to stderr", file=sys.stderr)
Code: Select all
bin/FreeCAD /path/to/aaa.FCMacro > output.stdout 2> output.stderr
However, if I run FreeCADCmd instead, then the stderr line ends up in output.stderr. So, there's something about the redirection in the GUI executable that is merging stderr in to stdout.
Will try to respond to the rest of your post later, but need to run now. Thanks! -Ian-