##// END OF EJS Templates
Document private methods in ExecutionMagics
Takafumi Arakaki -
Show More
@@ -630,6 +630,30 b' python-profiler package from non-free.""")'
630 return stats
630 return stats
631
631
632 def _run_with_debugger(self, code, code_ns, break_point, filename):
632 def _run_with_debugger(self, code, code_ns, break_point, filename):
633 """
634 Run `code` in debugger with a break point.
635
636 Parameters
637 ----------
638 code : str
639 Code to execute.
640 code_ns : dict
641 A namespace in which `code` is executed.
642 break_point : str
643 Line number in the file specified by `filename` argument
644 or a string in the format ``file:line``. In the latter
645 case, `filename` is ignored.
646 See also :func:`.parse_breakpoint`.
647 filename : str
648 Path to the file in which break point is specified.
649
650 Raises
651 ------
652 UsageError
653 If no meaningful break point is given by `break_point` and
654 `filename`.
655
656 """
633 deb = debugger.Pdb(self.shell.colors)
657 deb = debugger.Pdb(self.shell.colors)
634 # reset Breakpoint state, which is moronically kept
658 # reset Breakpoint state, which is moronically kept
635 # in a class
659 # in a class
@@ -675,6 +699,17 b' python-profiler package from non-free.""")'
675
699
676 @staticmethod
700 @staticmethod
677 def _run_with_timing(run, nruns):
701 def _run_with_timing(run, nruns):
702 """
703 Run function `run` and print timing information.
704
705 Parameters
706 ----------
707 run : callable
708 Any callable object which takes no argument.
709 nruns : int
710 Number of times to execute `run`.
711
712 """
678 twall0 = time.time()
713 twall0 = time.time()
679 if nruns == 1:
714 if nruns == 1:
680 t0 = clock2()
715 t0 = clock2()
General Comments 0
You need to be logged in to leave comments. Login now