Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
36 lines (28 loc) · 863 Bytes

File metadata and controls

36 lines (28 loc) · 863 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
"""
Debugger factory. Set PYTHON_DEBUGGER to a module path that has a post_mortem
function in it. Defaults to bpdb. This allows alternate debuggers to be used,
such as pycopia.debugger. :)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
import os
import sys
post_mortem = None
def _get_debugger():
global post_mortem
modname = os.environ.get("PYTHON_DEBUGGER", "bpdb")
__import__(modname)
mod = sys.modules[modname]
pm = getattr(mod, "post_mortem")
if pm.__code__.co_argcount > 2:
post_mortem = pm
else:
def _post_mortem(t, ex, exval):
return pm(t)
post_mortem = _post_mortem
_get_debugger()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.