Minor fix to bfroehle's Python 3 changes.

This commit is contained in:
Andreas Kloeckner 2012-07-14 16:29:32 -04:00
parent 7b78bded59
commit 103ae06a01
2 changed files with 15 additions and 4 deletions

View File

@ -4,9 +4,14 @@ from pudb.py3compat import PY3
def generate_executable_lines_for_code(code):
l = code.co_firstlineno
yield l
for c in code.co_lnotab[1::2]:
l += ord(c)
yield l
if PY3:
for c in code.co_lnotab[1::2]:
l += c
yield l
else:
for c in code.co_lnotab[1::2]:
l += ord(c)
yield l

View File

@ -1,3 +1,9 @@
#! /bin/sh
python -m pudb.run debug_me.py
if test "$1" = ""; then
PYINTERP="python"
else
PYINTERP="$1"
fi
$PYINTERP -m pudb.run debug_me.py