From ba5029b57a2e75a29e81b9a3cadec60d7f839b2f 2013-03-24 15:08:46 From: Takafumi Arakaki Date: 2013-03-24 15:08:46 Subject: [PATCH] Document ExecutionMagics._run_with_profiler --- diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index 98483d2..7139485 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -184,6 +184,19 @@ python-profiler package from non-free.""") return self._run_with_profiler(arg_str, opts, self.shell.user_ns) def _run_with_profiler(self, code, opts, namespace): + """ + Run `code` with profiler. Used by ``%prun`` and ``%run -p``. + + Parameters + ---------- + code : str + Code to be executed. + opts : Struct + Options parsed by `self.parse_options`. + namespace : dict + A dictionary for Python namespace (e.g., `self.shell.user_ns`). + + """ opts.merge(Struct(D=[''], l=[], s=['time'], T=['']))