Have a look at the docs here:
http://www.boost.org/build/doc/html/jam/language.html#jam.language.variables
 
> Specifically, I have a variable that captures the output of an external
> tool I have executed. How can I strip off the trailing newline from that
> when I assign that to another variable ?
 
The SHELL rule has an optional parameter that will automatically strip off the trailing newline
(this is not documented).
 
 
Use it like this:
 
local output = [ SHELL path/to/tool.py : strip-eol ] ;
 
And the newline will automatically be stripped.