Commit bac80022 authored by Guido van Rossum's avatar Guido van Rossum

Mention use of profile.py to run a script (AMK).

parent f967bf63
...@@ -120,6 +120,10 @@ function: ...@@ -120,6 +120,10 @@ function:
profile.run("foo()", 'fooprof') profile.run("foo()", 'fooprof')
\end{verbatim} \end{verbatim}
\code{profile.py} can also be invoked as
a script to profile another script. For example:
\code{python /usr/local/lib/python1.4/profile.py myscript.py}
When you wish to review the profile, you should use the methods in the When you wish to review the profile, you should use the methods in the
\code{pstats} module. Typically you would load the statistics data as \code{pstats} module. Typically you would load the statistics data as
follows: follows:
......
...@@ -120,6 +120,10 @@ function: ...@@ -120,6 +120,10 @@ function:
profile.run("foo()", 'fooprof') profile.run("foo()", 'fooprof')
\end{verbatim} \end{verbatim}
\code{profile.py} can also be invoked as
a script to profile another script. For example:
\code{python /usr/local/lib/python1.4/profile.py myscript.py}
When you wish to review the profile, you should use the methods in the When you wish to review the profile, you should use the methods in the
\code{pstats} module. Typically you would load the statistics data as \code{pstats} module. Typically you would load the statistics data as
follows: follows:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment