-
Notifications
You must be signed in to change notification settings - Fork 289
/
apt2.py
executable file
·58 lines (52 loc) · 1.58 KB
/
apt2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python
"""
Standard Launcher for the SKIDY Framework
"""
import sys
import traceback
from core.framework import Framework
def main():
framework = Framework()
try:
framework.run(sys.argv[1:])
except KeyboardInterrupt:
framework.ctrlc()
except Exception as e:
exc_type, exc_value, exc_traceback = sys.exc_info()
print "*** print_tb:"
traceback.print_tb(exc_traceback, limit=1, file=sys.stdout)
print
print
print "*** print_exception:"
traceback.print_exception(exc_type, exc_value, exc_traceback,
limit=2, file=sys.stdout)
print
print
print "*** print_exc:"
traceback.print_exc()
# print
# print
# print "*** format_exc, first and last line:"
# formatted_lines = traceback.format_exc().splitlines()
# print formatted_lines[0]
# print formatted_lines[-1]
# print
# print
# print "*** format_exception:"
# print repr(traceback.format_exception(exc_type, exc_value,
# exc_traceback))
# print
# print
# print "*** extract_tb:"
# print repr(traceback.extract_tb(exc_traceback))
# print
# print
# print "*** format_tb:"
# print repr(traceback.format_tb(exc_traceback))
# print
# print
# print "*** tb_lineno:", exc_traceback.tb_lineno
# print sys.exc_info()[0]
# framework.cleanup()
if __name__ == "__main__":
main()