Show More
@@ -615,48 +615,60 b' class Pdb(OldPdb):' | |||||
615 | """Print the call signature for any callable object. |
|
615 | """Print the call signature for any callable object. | |
616 |
|
616 | |||
617 | The debugger interface to %pdef""" |
|
617 | The debugger interface to %pdef""" | |
618 | namespaces = [('Locals', self.curframe.f_locals), |
|
618 | namespaces = [ | |
619 |
|
|
619 | ("Locals", self.curframe_locals), | |
620 | self.shell.find_line_magic('pdef')(arg, namespaces=namespaces) |
|
620 | ("Globals", self.curframe.f_globals), | |
|
621 | ] | |||
|
622 | self.shell.find_line_magic("pdef")(arg, namespaces=namespaces) | |||
621 |
|
623 | |||
622 | def do_pdoc(self, arg): |
|
624 | def do_pdoc(self, arg): | |
623 | """Print the docstring for an object. |
|
625 | """Print the docstring for an object. | |
624 |
|
626 | |||
625 | The debugger interface to %pdoc.""" |
|
627 | The debugger interface to %pdoc.""" | |
626 | namespaces = [('Locals', self.curframe.f_locals), |
|
628 | namespaces = [ | |
627 |
|
|
629 | ("Locals", self.curframe_locals), | |
628 | self.shell.find_line_magic('pdoc')(arg, namespaces=namespaces) |
|
630 | ("Globals", self.curframe.f_globals), | |
|
631 | ] | |||
|
632 | self.shell.find_line_magic("pdoc")(arg, namespaces=namespaces) | |||
629 |
|
633 | |||
630 | def do_pfile(self, arg): |
|
634 | def do_pfile(self, arg): | |
631 | """Print (or run through pager) the file where an object is defined. |
|
635 | """Print (or run through pager) the file where an object is defined. | |
632 |
|
636 | |||
633 | The debugger interface to %pfile. |
|
637 | The debugger interface to %pfile. | |
634 | """ |
|
638 | """ | |
635 | namespaces = [('Locals', self.curframe.f_locals), |
|
639 | namespaces = [ | |
636 |
|
|
640 | ("Locals", self.curframe_locals), | |
637 | self.shell.find_line_magic('pfile')(arg, namespaces=namespaces) |
|
641 | ("Globals", self.curframe.f_globals), | |
|
642 | ] | |||
|
643 | self.shell.find_line_magic("pfile")(arg, namespaces=namespaces) | |||
638 |
|
644 | |||
639 | def do_pinfo(self, arg): |
|
645 | def do_pinfo(self, arg): | |
640 | """Provide detailed information about an object. |
|
646 | """Provide detailed information about an object. | |
641 |
|
647 | |||
642 | The debugger interface to %pinfo, i.e., obj?.""" |
|
648 | The debugger interface to %pinfo, i.e., obj?.""" | |
643 | namespaces = [('Locals', self.curframe.f_locals), |
|
649 | namespaces = [ | |
644 |
|
|
650 | ("Locals", self.curframe_locals), | |
645 | self.shell.find_line_magic('pinfo')(arg, namespaces=namespaces) |
|
651 | ("Globals", self.curframe.f_globals), | |
|
652 | ] | |||
|
653 | self.shell.find_line_magic("pinfo")(arg, namespaces=namespaces) | |||
646 |
|
654 | |||
647 | def do_pinfo2(self, arg): |
|
655 | def do_pinfo2(self, arg): | |
648 | """Provide extra detailed information about an object. |
|
656 | """Provide extra detailed information about an object. | |
649 |
|
657 | |||
650 | The debugger interface to %pinfo2, i.e., obj??.""" |
|
658 | The debugger interface to %pinfo2, i.e., obj??.""" | |
651 | namespaces = [('Locals', self.curframe.f_locals), |
|
659 | namespaces = [ | |
652 |
|
|
660 | ("Locals", self.curframe_locals), | |
653 | self.shell.find_line_magic('pinfo2')(arg, namespaces=namespaces) |
|
661 | ("Globals", self.curframe.f_globals), | |
|
662 | ] | |||
|
663 | self.shell.find_line_magic("pinfo2")(arg, namespaces=namespaces) | |||
654 |
|
664 | |||
655 | def do_psource(self, arg): |
|
665 | def do_psource(self, arg): | |
656 | """Print (or run through pager) the source code for an object.""" |
|
666 | """Print (or run through pager) the source code for an object.""" | |
657 | namespaces = [('Locals', self.curframe.f_locals), |
|
667 | namespaces = [ | |
658 |
|
|
668 | ("Locals", self.curframe_locals), | |
659 | self.shell.find_line_magic('psource')(arg, namespaces=namespaces) |
|
669 | ("Globals", self.curframe.f_globals), | |
|
670 | ] | |||
|
671 | self.shell.find_line_magic("psource")(arg, namespaces=namespaces) | |||
660 |
|
672 | |||
661 | def do_where(self, arg): |
|
673 | def do_where(self, arg): | |
662 | """w(here) |
|
674 | """w(here) |
General Comments 0
You need to be logged in to leave comments.
Login now