File: gprospector.py

package info (click to toggle)
python-gevent 25.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,036 kB
  • sloc: python: 170,894; ansic: 82,360; sh: 6,265; makefile: 1,550; javascript: 108
file content (22 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from __future__ import print_function
import re
import sys

from prospector.run import main

def _excepthook(e, t, tb):
    while tb is not None:
        frame = tb.tb_frame
        print(frame.f_code, frame.f_code.co_name)
        for n in ('self', 'node', 'elt'):
            if n in frame.f_locals:
                print(n, frame.f_locals[n])
        print('---')
        tb = tb.tb_next


sys.excepthook = _excepthook

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())