'returns 1 if any flags where actually set, otherwise 0.'

def active_set(self, active_flags=None):

    r = 0
    ok_flags = []
    if (not active_flags):
        self.active = []
    elif (type(active_flags) in (types.TupleType, types.ListType)):
        flags = self._as_one_list(active_flags)
        for t in flags:
            if (t not in self.debug_flags):
                sys.stderr.write(('Invalid    debugflag    given:    %s\n' % t))
            ok_flags.append(t)
        self.active = ok_flags
        r = 1
    else:
        try:
            flags = active_flags.split(',')
        except:
            self.show('***')
            self.show(('***    Invalid    debug    param    given:    %s' % active_flags))
            self.show('***    please    correct    your    param!')
            self.show('***    due    to    this,    full    debuging    is    enabled')
            self.active = self.debug_flags
        for f in flags:
            s = f.strip()
            ok_flags.append(s)
        self.active = ok_flags
    self._remove_dupe_flags()
    return r
