diff -r 5896f887a93a Doc/library/profile.rst --- a/Doc/library/profile.rst Tue Jul 02 09:02:03 2013 -0400 +++ b/Doc/library/profile.rst Wed Jul 03 19:17:20 2013 +0200 @@ -267,14 +267,14 @@ Directly using the :class:`Profile` class allows formatting profile results without writing the profile data to a file:: - import cProfile, pstats, io + import cProfile, pstats, StringIO pr = cProfile.Profile() pr.enable() - ... do something ... + # ... do something ... pr.disable() - s = io.StringIO() + s = StringIO.StringIO() ps = pstats.Stats(pr, stream=s) - ps.print_results() + ps.print_stats() .. method:: enable()