1. Home
  2. Computing & Technology
  3. Python

How To Create A HTML Calendar In Python Dynamically

From , former About.com Guide

10 of 10

Calling the main() Function

As all of this code is in the main() function, do not forget to call it.

if __name__ == "__main__":
     main()

Just this simple calendar can be used in any way that needs a calendar representation. By hyperlinking the dates in the HTML, one can easily create a diary functionality. Alternatively, one can check against a diary file and then reflect which dates are taken by their color. Or, if one converts this program into a CGI script, one can have it generated on the fly.

Of course, this is just an overview of the calendar module's functionality. The documentation gives a fuller view.

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
  4. Web Development
  5. Python and HTML - HTML Calendars in Python - Calling the main() Function

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

All rights reserved.