home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_1756 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  1.4 KB  |  28 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import inspect
  5. import IPython.ipapi as IPython
  6. from IPython.genutils import arg_split
  7. ip = IPython.ipapi.get()
  8. from IPython import Debugger
  9.  
  10. def call_pydb(self, args):
  11.     
  12.     try:
  13.         import pydb
  14.     except ImportError:
  15.         raise ImportError("pydb doesn't seem to be installed.")
  16.  
  17.     if not hasattr(pydb.pydb, 'runv'):
  18.         raise ImportError('You need pydb version 1.19 or later installed.')
  19.     hasattr(pydb.pydb, 'runv')
  20.     argl = arg_split(args)
  21.     if len(inspect.getargspec(pydb.runv)[0]) == 2:
  22.         pdb = Debugger.Pdb(color_scheme = self.rc.colors)
  23.         (None, None, ip.IP.history_saving_wrapper)((lambda : pydb.runv(argl, pdb)))()
  24.     else:
  25.         (None, ip.IP.history_saving_wrapper)((lambda : pydb.runv(argl)))()
  26.  
  27. ip.expose_magic('pydb', call_pydb)
  28.