CastXML / pygccxml

pygccxml is a specialized XML reader that reads the output from CastXML or GCCXML. It provides a simple framework to navigate C++ declarations, using Python classes.
Boost Software License 1.0
131 stars 45 forks source link

Pipe `stderr` when calling `subprocess.Popen` #52

Closed praetorian20 closed 8 years ago

praetorian20 commented 8 years ago

Code that uses the which command to find castxml and clang++ now pipes stderr in addition to stdout. This prevents error messages from being printed if the executables being searched for are not on PATH.

iMichka commented 8 years ago

What errors have you seen ?

I could not reproduce what you are describing here. I removed castxml from my path (and I have no gccxml installed). which castxml returns command not found, but I do not get any supplementary errors while running pygccxml (only the exception "No c++ parser found. Please install castxml or gccxml."). I'll have a try on Linux to see if there is a difference.

I am OK on the principle of the patch, just want to know more in which cases this is happening.

praetorian20 commented 8 years ago

Just the standard stuff that which prints when it cannot find the executable

which castxml
/usr/bin/which: no castxml in (<path>)

It's a cosmetic fix, doesn't affect any functionality.

I don't have castxml on path, instead I specify it using xml_generator_path in _xmlgenerator.cfg.