DebugClients/Python3/DebugClientBase.py

changeset 2486
e16c9ced6ae5
parent 2376
a0409e65bd81
child 2636
f3dd3c8d4aa4
equal deleted inserted replaced
2484:105d78ba97d4 2486:e16c9ced6ae5
1515 vlist = self.__formatVariablesList(dictkeys, dict, scope, filter, 1515 vlist = self.__formatVariablesList(dictkeys, dict, scope, filter,
1516 formatSequences) 1516 formatSequences)
1517 varlist.extend(vlist) 1517 varlist.extend(vlist)
1518 1518
1519 if obj is not None and not formatSequences: 1519 if obj is not None and not formatSequences:
1520 if repr(obj).startswith('{'): 1520 try:
1521 varlist.append(('...', 'dict', "{0:d}".format(len(obj.keys())))) 1521 if repr(obj).startswith('{'):
1522 elif repr(obj).startswith('['): 1522 varlist.append(('...', 'dict', "{0:d}".format(len(obj.keys()))))
1523 varlist.append(('...', 'list', "{0:d}".format(len(obj)))) 1523 elif repr(obj).startswith('['):
1524 elif repr(obj).startswith('('): 1524 varlist.append(('...', 'list', "{0:d}".format(len(obj))))
1525 varlist.append(('...', 'tuple', "{0:d}".format(len(obj)))) 1525 elif repr(obj).startswith('('):
1526 varlist.append(('...', 'tuple', "{0:d}".format(len(obj))))
1527 except:
1528 pass
1526 1529
1527 self.write('{0}{1}\n'.format(DebugProtocol.ResponseVariable, str(varlist))) 1530 self.write('{0}{1}\n'.format(DebugProtocol.ResponseVariable, str(varlist)))
1528 1531
1529 def __formatQt4Variable(self, value, vtype): 1532 def __formatQt4Variable(self, value, vtype):
1530 """ 1533 """

eric ide

mercurial