Permalink
Browse files

Minor fix to bfroehle's Python 3 changes.

  • Loading branch information...
1 parent 7b78bde commit 103ae06a012a32653f72de284e4439b6d41a66fe @inducer committed Jul 14, 2012
Showing with 15 additions and 4 deletions.
  1. +8 −3 pudb/lowlevel.py
  2. +7 −1 try-the-debugger.sh
View
@@ -4,9 +4,14 @@
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
@@ -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

0 comments on commit 103ae06

Please sign in to comment.