1. Technology

Building a Whitelist for a Spam Filter

By

6 of 6

Calling main()

This is fairly boiler-plate code, but it is important nonetheless.

 if __name__ == '__main__': 
      main(sys.argv[1]) 
Note that we are relying on the sys module that we imported earlier. As we waited this long to use it, you could also import sys as part of the if-loop. However, coming from C, all of my library calls tend to occur at the start of the file.

©2014 About.com. All rights reserved.