How to Solve NameError: name 'Scanner' is not defined -- SCons

Solution: Import the 'Scanner' module

# Add the following line to the top of your code
from SCons.Scanner import Scanner

 

For more information:
SCons Scanner