1. Home
  2. Computing & Technology
  3. Python

How To Create A HTML Calendar In Python Dynamically

From Al Lukaszewski, for About.com

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

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
  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.