DebugClients/Python/DebugClientBase.py

changeset 2486
e16c9ced6ae5
parent 2376
a0409e65bd81
child 2636
f3dd3c8d4aa4
equal deleted inserted replaced
2484:105d78ba97d4 2486:e16c9ced6ae5
1482 vlist = self.__formatVariablesList(dictkeys, dict, scope, filter, 1482 vlist = self.__formatVariablesList(dictkeys, dict, scope, filter,
1483 formatSequences) 1483 formatSequences)
1484 varlist.extend(vlist) 1484 varlist.extend(vlist)
1485 1485
1486 if obj is not None and not formatSequences: 1486 if obj is not None and not formatSequences:
1487 if unicode(repr(obj)).startswith('{'): 1487 try:
1488 varlist.append(('...', 'dict', "%d" % len(obj.keys()))) 1488 if unicode(repr(obj)).startswith('{'):
1489 elif unicode(repr(obj)).startswith('['): 1489 varlist.append(('...', 'dict', "%d" % len(obj.keys())))
1490 varlist.append(('...', 'list', "%d" % len(obj))) 1490 elif unicode(repr(obj)).startswith('['):
1491 elif unicode(repr(obj)).startswith('('): 1491 varlist.append(('...', 'list', "%d" % len(obj)))
1492 varlist.append(('...', 'tuple', "%d" % len(obj))) 1492 elif unicode(repr(obj)).startswith('('):
1493 varlist.append(('...', 'tuple', "%d" % len(obj)))
1494 except:
1495 pass
1493 1496
1494 self.write('%s%s\n' % (DebugProtocol.ResponseVariable, unicode(varlist))) 1497 self.write('%s%s\n' % (DebugProtocol.ResponseVariable, unicode(varlist)))
1495 1498
1496 def __formatQt4Variable(self, value, vtype): 1499 def __formatQt4Variable(self, value, vtype):
1497 """ 1500 """

eric ide

mercurial