def do_display(self, arg):
        if not arg:
            self._displayItems()
        else:
            params = arg.split()
            if params[0] == 'list' and not params[1:]:
                self._listDisplayItems()
            elif params[0] in ('enable','disable','delete'):
                try:
                    nums = [int(x) for x in params[1:]]
                except ValueError, msg:
                    print '***', ValueError, msg
                    return
                missing = []
                _nums = []

                for num in nums:
                    if num in self._displayList:
                        _nums.append(num)
                    else:
                        missing.append(str(num))
                if params[0] == 'enable':
                    for num in _nums:
                        self._displayList[num][0] = True
                if params[0] == 'disable':
                    for num in _nums:
                        self._displayList[num][0] = False
                if params[0] == 'delete':
                    for num in nums:
                        del self._displayList[num]
                self._listDisplayItems()
                if missing:
                    print "Warning: could not find display num(s) %s" \
                                                        % ','.join(missing)
            else:
                if self._displayList:
                    displayNum = max(self._displayList) + 1
                else:
                    displayNum = 0
                self._displayList[displayNum] = [True, arg]
                self._listDisplayItems()
dataset/ETHPy150Open sassoftware/conary/conary/lib/epdb_embedded/__init__.py/Epdb.do_display/original