def cmd_exists(cmd):
    """Return true if the command do exists in the environement"""
    try:
        import subprocess
        result = subprocess.call('type ' + cmd, shell=True, stdout=
            subprocess.PIPE, stderr=subprocess.PIPE)
        if result == 0:
            return True
        else:
            return False
    except Exception:
        return True
