Boost logo

Boost-Build :

Subject: Re: [Boost-build] string manipulation
From: aaron_at_[hidden]
Date: 2016-10-13 17:02:23

Making Python perform the redirect seems to work:
command = "python -c \"import sys; sys.stderr = sys.stdout; import non_existent; print 'asdf'\"" ;
output = [ SHELL $(command) : strip-eol ] ;
echo ------------------------ ;
echo $(output) ;
echo ------------------------ ;
exit : 0 ;
 Which will output the following:
Traceback (most recent call last):
 File "<string>", line 1, in <module>
ImportError: No module named non_existent
 That's about the best I could come up with at the moment.
 It would probably be cleaner, though, to just create a script and do all of your setup/checking in there and just call out to that script to perform the configuration.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at