Skip to content

Commit

Permalink
PEP8 ipython integration
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Feb 18, 2014
1 parent 74a0d9c commit 095d240
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pudb/ipython.py
Expand Up @@ -18,6 +18,7 @@
ip = TerminalInteractiveShell.instance()
_ipython_version = (0, 11)


# This conforms to IPython version 0.10
def pudb_f_v10(self, arg):
""" Debug a script (like %run -d) in the IPython process, using PuDB.
Expand All @@ -43,6 +44,7 @@ def pudb_f_v10(self, arg):
from pudb import runscript
ip.IP.history_saving_wrapper(lambda: runscript(path, args))()


# This conforms to IPython version 0.11
def pudb_f_v11(self, arg):
""" Debug a script (like %run -d) in the IPython process, using PuDB.
Expand Down Expand Up @@ -71,8 +73,8 @@ def pudb_f_v11(self, arg):
from pudb import runscript
runscript(path, args)

if _ipython_version == (1, 0):

if _ipython_version == (1, 0):
# For IPython 1.0.0
def pudb(line):
"""
Expand Down Expand Up @@ -112,7 +114,7 @@ def debugger(self, force=False):
if not (force or self.call_pdb):
return

if not hasattr(sys,'last_traceback'):
if not hasattr(sys, 'last_traceback'):
error('No traceback has been produced, nothing to debug.')
return

Expand Down

0 comments on commit 095d240

Please sign in to comment.