diff options
| author | Steven Knight <knight@baldmt.com> | 2002-03-24 00:51:23 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2002-03-24 00:51:23 (GMT) |
| commit | 94d7ac89ad998937fbbc3c896dffc88cece8e925 (patch) | |
| tree | 9120c2c8716c1ff5c824a644fb3a967ada0e8fd0 /src/engine/SCons/Util.py | |
| parent | 2fa424ece5fd4df18a3aeff1f6e59e2ecb41a28e (diff) | |
| download | SCons-94d7ac89ad998937fbbc3c896dffc88cece8e925.zip SCons-94d7ac89ad998937fbbc3c896dffc88cece8e925.tar.gz SCons-94d7ac89ad998937fbbc3c896dffc88cece8e925.tar.bz2 | |
Move SCons.Util.scons_str2nodes() to SCons.Node/__init__.py and shorten its name.
Diffstat (limited to 'src/engine/SCons/Util.py')
| -rw-r--r-- | src/engine/SCons/Util.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/engine/SCons/Util.py b/src/engine/SCons/Util.py index 5175ac5..f60e981 100644 --- a/src/engine/SCons/Util.py +++ b/src/engine/SCons/Util.py @@ -44,42 +44,6 @@ except ImportError: class UserString: pass -import SCons.Node -import SCons.Node.FS - -def scons_str2nodes(arg, node_factory=SCons.Node.FS.default_fs.File): - """This function converts a string or list into a list of Node instances. - It follows the rules outlined in the SCons design document by accepting - any of the following inputs: - - A single string containing names separated by spaces. These will be - split apart at the spaces. - - A single Node instance, - - A list containingg either strings or Node instances. Any strings - in the list are not split at spaces. - In all cases, the function returns a list of Node instances.""" - - narg = arg - if is_String(arg): - narg = string.split(arg) - elif not is_List(arg): - narg = [arg] - - nodes = [] - for v in narg: - if is_String(v): - nodes.append(node_factory(v)) - # Do we enforce the following restriction? Maybe, but it - # also restricts what we can do for allowing people to - # use the engine with alternate Node implementations... - # Perhaps this should be split in two, with the SCons.Node - # logic in a wrapper somewhere under SCons.Node, and the - # string-parsing logic here...? - #elif not issubclass(v.__class__, SCons.Node.Node): - # raise TypeError - else: - nodes.append(v) - - return nodes class PathList(UserList.UserList): |
