Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / third_party / cython / src / Cython / Debugging.py
blobedb3f4e8ca582e4f0bc938c761b1fdf1f9d56f6b
1 ###############################################
3 # Odds and ends for debugging
5 ###############################################
7 def print_call_chain(*args):
8 import sys
9 print(" ".join(map(str, args)))
10 f = sys._getframe(1)
11 while f:
12 name = f.f_code.co_name
13 s = f.f_locals.get('self', None)
14 if s:
15 c = getattr(s, "__class__", None)
16 if c:
17 name = "%s.%s" % (c.__name__, name)
18 print("Called from: %s %s" % (name, f.f_lineno))
19 f = f.f_back
20 print("-" * 70)