1. Technology

How To Create A HTML Calendar In Python Dynamically

By

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.

Related Video
Create Tables in HTML
Link to Webpages in HTML
  1. About.com
  2. Technology
  3. Python
  4. Web Development
  5. Python and HTML - HTML Calendars in Python - Calling the main() Function

©2014 About.com. All rights reserved.