cgi.FieldStorage.getfirst()

FieldStorage.getfirst(name, default=None) This method always returns only one value associated with form field name. The method returns only the first value in case that more values were posted under such name. Please note that the order in which the values are received may vary from browser to browser and should not be counted on. [1] If no such form field or value exists then the method returns the value specified by the optional parameter default. This parameter defaults to None if not sp

cgi.escape()

cgi.escape(s, quote=False) Convert the characters '&', '<' and '>' in string s to HTML-safe sequences. Use this if you need to display text that might contain such characters in HTML. If the optional flag quote is true, the quotation mark character (") is also translated; this helps for inclusion in an HTML attribute value delimited by double quotes, as in <a href="...">. Note that single quotes are never translated. Deprecated since version 3.2: This function is unsafe beca

callable()

callable(object) Return True if the object argument appears callable, False if not. If this returns true, it is still possible that a call fails, but if it is false, calling object will never succeed. Note that classes are callable (calling a class returns a new instance); instances are callable if their class has a __call__() method. New in version 3.2: This function was first removed in Python 3.0 and then brought back in Python 3.2.

calendar.weekheader()

calendar.weekheader(n) Return a header containing abbreviated weekday names. n specifies the width in characters for one weekday.

calendar.weekday()

calendar.weekday(year, month, day) Returns the day of the week (0 is Monday) for year (1970–...), month (1–12), day (1–31).

calendar.timegm()

calendar.timegm(tuple) An unrelated but handy function that takes a time tuple such as returned by the gmtime() function in the time module, and returns the corresponding Unix timestamp value, assuming an epoch of 1970, and the POSIX encoding. In fact, time.gmtime() and timegm() are each others’ inverse.

calendar.TextCalendar.pryear()

pryear(theyear, w=2, l=1, c=6, m=3) Print the calendar for an entire year as returned by formatyear().

calendar.TextCalendar.prmonth()

prmonth(theyear, themonth, w=0, l=0) Print a month’s calendar as returned by formatmonth().

calendar.TextCalendar.formatyear()

formatyear(theyear, w=2, l=1, c=6, m=3) Return a m-column calendar for an entire year as a multi-line string. Optional parameters w, l, and c are for date column width, lines per week, and number of spaces between month columns, respectively. Depends on the first weekday as specified in the constructor or set by the setfirstweekday() method. The earliest year for which a calendar can be generated is platform-dependent.

calendar.TextCalendar.formatmonth()

formatmonth(theyear, themonth, w=0, l=0) Return a month’s calendar in a multi-line string. If w is provided, it specifies the width of the date columns, which are centered. If l is given, it specifies the number of lines that each week will use. Depends on the first weekday as specified in the constructor or set by the setfirstweekday() method.