[Scons-users] Question over scanners

RW garlicbready at googlemail.com
Wed Sep 6 14:48:09 EDT 2017


Hi,
I've noticed in the man page and the user docs the recommended way to
create scanners is to use something like this

  def kfile_scan(node, env, path):
      contents = node.get_text_contents()
      includes = include_re.findall(contents)
      return env.File(includes)

  kscan = Scanner(function = kfile_scan, skeys = ['.k'])

However when looking at the code for scons I've noticed that a lot of
inbuilt scanners use / inherit from SCons.Scanner.Base
also there's a comment in the code of
"    TODO:  Deprecate this some day.  We've moved the functionality
    inside the Base class and really don't need this factory function
    any more.  It was, however, used by some of our Tool modules, so
    the call probably ended up in various people's custom modules
    patterned on SCons code."

>From an end users point of view does this mean they should be using the
base class, or is this for internal use only?

Many Thanks
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170906/3b20c134/attachment.html>


More information about the Scons-users mailing list