I\'m reading a True - False value from a file and I need to convert it to boolean. Currently it always converts it to True even if the value is set
True - False
True
If you need quick way to convert strings into bools (that functions with most strings) try.
def conv2bool(arg): try: res= (arg[0].upper()) == "T" except Exception,e: res= False return res # or do some more processing with arg if res is false