python example of how to write the scanner functionality... -sai