[issue18033] Example for Profile Module shows incorrect method

2013-09-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: I consolidated the patches and example and have committed them to 2.7, 3.3 and 3.4. Thanks for your contributions. -- nosy: +orsenthil resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _

[issue18033] Example for Profile Module shows incorrect method

2013-09-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93018d47793f by Senthil Kumaran in branch '2.7': Correct Profile class usage example. Addresses issue #18033 . http://hg.python.org/cpython/rev/93018d47793f New changeset ab4d3ccb92e6 by Senthil Kumaran in branch '3.3': Correct Profile class usage e

[issue18033] Example for Profile Module shows incorrect method

2013-07-03 Thread Olivier Hervieu
Olivier Hervieu added the comment: Here is a fixed version for python2.7. Using StringIO instead of io module fixes the problem pointed by Ezio. The print_stats method dumps the stats either on sys.stdout if `Stats` class is declared without a stream specification or in the given stream paramet

[issue18033] Example for Profile Module shows incorrect method

2013-06-11 Thread Armin Rigo
Armin Rigo added the comment: A slightly more complete example that I tested: http://stackoverflow.com/a/16077568/1556290 -- nosy: +arigo ___ Python tracker ___

[issue18033] Example for Profile Module shows incorrect method

2013-06-08 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the patches, however the Python 2 example doesn't work. I think a BytesIO should be used instead of a StringIO, and print_stats() only returns a pstats.Stats instance, without actually printing any result. I wonder if print_results was an old method tha

[issue18033] Example for Profile Module shows incorrect method

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: Added py3 patch -- keywords: +patch nosy: +dmi.baranov versions: +Python 3.4 Added file: http://bugs.python.org/file30390/issue18033_py3.patch ___ Python tracker _

[issue18033] Example for Profile Module shows incorrect method

2013-05-27 Thread Dmi Baranov
Dmi Baranov added the comment: py2 -- Added file: http://bugs.python.org/file30391/issue18033_py2.patch ___ Python tracker ___ ___ Pyt

[issue18033] Example for Profile Module shows incorrect method

2013-05-26 Thread Ezio Melotti
Changes by Ezio Melotti : -- keywords: +easy nosy: +ezio.melotti stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue18033] Example for Profile Module shows incorrect method

2013-05-25 Thread Phil Connell
Changes by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18033] Example for Profile Module shows incorrect method

2013-05-22 Thread Jough Dempsey
New submission from Jough Dempsey: The example on this page: http://docs.python.org/2/library/profile.html?highlight=pstats#profile.Profile Shows: import cProfile, pstats, io pr = cProfile.Profile() pr.enable() ... do something ... pr.disable() s = io.StringIO() ps = pstats.Stats(pr, stream=s)