blob: 7c1de6649290f8720464148cd7ea950d19a5a86a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
'''
Autodebugger output contains -1 for function entry and -2 for function exit.
This script will indent the output nicely
'''
import os, sys
lines = sys.stdin.read().split('\n')
depth = 0
for i in range(len(lines)):
line = lines[i]
if line.startswith('AD:-2,'):
depth -= 1
print str(depth) + '|' + line
if line.startswith('AD:-1,'):
depth += 1
|