A simple method of ensuring True/False works in all versions of python. Ripped from options.py - part of Greg Ward's Optik; a more-functional-than-getopt options parser for python.
# Do the right thing with boolean values for all known Python versions.
try:
True, False
except NameError:
(True, False) = (1, 0)