SCons :: Subst :: CmdStringHolder :: Class CmdStringHolder
[hide private]
[frames] | no frames]

Class CmdStringHolder

source code

UserString.UserString --+
                        |
                       CmdStringHolder

This is a special class used to hold strings generated by
scons_subst() and scons_subst_list().  It defines a special method
escape().  When passed a function with an escape algorithm for a
particular platform, it will return the contained string with the
proper escape sequences inserted.



Instance Methods [hide private]
 
__init__(self, cmd, literal=False) source code
 
is_literal(self) source code
 
escape(self, escape_func, quote_func=<function quote_spaces at 0x836af44>)
Escape the string with the supplied function.
source code

Inherited from UserString.UserString: __add__, __cmp__, __complex__, __contains__, __float__, __getitem__, __getslice__, __hash__, __int__, __len__, __long__, __mod__, __mul__, __radd__, __repr__, __rmul__, __str__, capitalize, center, count, decode, encode, endswith, expandtabs, find, index, isalnum, isalpha, isdecimal, isdigit, islower, isnumeric, isspace, istitle, isupper, join, ljust, lower, lstrip, partition, replace, rfind, rindex, rjust, rpartition, rsplit, rstrip, split, splitlines, startswith, strip, swapcase, title, translate, upper, zfill

Method Details [hide private]

__init__(self, cmd, literal=False)
(Constructor)

source code 
Overrides: UserString.UserString.__init__

escape(self, escape_func, quote_func=<function quote_spaces at 0x836af44>)

source code 
Escape the string with the supplied function.  The
function is expected to take an arbitrary string, then
return it with all special characters escaped and ready
for passing to the command interpreter.

After calling this function, the next call to str() will
return the escaped string.