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