Skip to content

Commit b726950

Browse files
committed
debug: another lab debugging tool
1 parent 642647a commit b726950

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lab/show_ast.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2+
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3+
4+
"""Dump the AST of a file."""
5+
6+
import ast
7+
import sys
8+
9+
from coverage.parser import ast_dump
10+
11+
ast_dump(ast.parse(open(sys.argv[1], "rb").read()))

lab/show_platform.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2+
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
3+
14
import platform
25
import types
36

0 commit comments

Comments
 (0)