#!/usr/bin/python def getBool(var): try: if var == "oui": return 1 else: return 0 except: return "error fonction getBool"