1. Home
  2. Computing & Technology
  3. Python

Building a Whitelist for a Spam Filter

From Al Lukaszewski, for About.com

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.

Explore Python
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.