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

Class CmdStringHolder

source code

       object --+            
                |            
    _abcoll.Sized --+        
                    |        
       object --+   |        
                |   |        
 _abcoll.Iterable --+        
                    |        
       object --+   |        
                |   |        
_abcoll.Container --+        
                    |        
     _abcoll.Sequence --+    
                        |    
    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.
Nested Classes [hide private]

Inherited from _abcoll.Sized: __metaclass__

Instance Methods [hide private]
 
__init__(self, cmd, literal=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
is_literal(self) source code
 
escape(self, escape_func, quote_func=<function quote_spaces at 0x997f534>)
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.
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

Inherited from _abcoll.Sequence: __iter__, __reversed__

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__

Class Methods [hide private]

Inherited from _abcoll.Sized: __subclasshook__

Class Variables [hide private]

Inherited from UserString.UserString: __abstractmethods__

Inherited from UserString.UserString (private): _abc_negative_cache, _abc_negative_cache_version, _abc_registry

Inherited from _abcoll.Sized (private): _abc_cache

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

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

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.