[Scons-users] How to capture the compiler output

yjtyzw at 126.com
Mon Jul 29 10:19:04 EDT 2024


Hi Guys,


‍I want to capture the compiler output, to get the warning and error counter.
‍I think I can redefinite the sys.write.stdout. So I did. And I can capture the scons command line, but I can't get compiler output(warning&error).
‍Then I find that compiler warning and error are print via sys.write.stderr, so I modify compiler argument, print all of compiler output via sys.write.stdout. But I can't get warning and error also.
I know scons call compiler via subprocess, subprocess can get compiler output. But scons don't save compiler output.
How can I capture compiler warning and error output via scons.











-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20240729/c1a2dee5/attachment.htm>


More information about the Scons-users mailing list