1. Home
  2. Computing & Technology
  3. Python

Building a Whitelist for a Spam Filter

From , former About.com Guide

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

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

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

  1. Home
  2. Computing & Technology
  3. Python

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

All rights reserved.