Skip to content

Commit cb1804f

Browse files
committed
add ast
1 parent 583306c commit cb1804f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test_ast/test_ast.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env python
2+
# coding=utf-8
3+
import ast
4+
5+
print eval('1 + 2')
6+
print eval("__import__('os').system('dir')")
7+
8+
print '='*50
9+
print ast.literal_eval("__import__('os').system('dir')")

0 commit comments

Comments
 (0)