Convert Python scripts to Python 3, delete unused ones

CL: none

PUBLISHED_FROM=4bbc2175634e20a726dd4b2dadff57f945b261d0
This commit is contained in:
Deomid Ryabkov 2018-12-24 20:15:42 +00:00 committed by Cesanta Bot
parent 22e602debb
commit e9a8e5468d

View File

@ -1,23 +0,0 @@
#!/usr/bin/python
# Analyzers output of firmware compiler with -DESP_ENABLE_MALLOC_TRACES
import re
import sys
allocs = {}
for l in sys.stdin:
m = re.match(r'(ca|ma|re|fr) (\S+)\s*(\S*)\s*(\S*)', l)
if not m: continue
op = m.group(1)
if op in ('ca', 'ma'):
allocs[m.group(2)] = long(m.group(3))
else:
if m.group(2) in allocs:
del allocs[m.group(2)]
if op == 're':
allocs[m.group(3)] = long(m.group(4))
for k, v in sorted(allocs.iteritems()):
print k, v