classification
Title: "sort" command doesn't work in pstats if run interactively
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: MLModel, akuchling, marcin.bachry
Priority: normal Keywords: needs review, patch

Created on 2008-11-26 15:00 by marcin.bachry, last changed 2010-04-02 17:05 by akuchling. This issue is now closed.

Files
File name Uploaded Description Edit
pstats-fix.diff marcin.bachry, 2008-11-26 15:00 fix
pstats-simplify.diff akuchling, 2010-04-02 17:05
Messages (3)
msg76467 - (view) Author: Marcin Bachry (marcin.bachry) Date: 2008-11-26 15:00
Sort command in Python's 3.0 pstats doesn't accept any valid argument
and views help all the time:

$ python3.0 -m pstats pstats
Welcome to the profile statistics browser.
% sort cumulative
Valid sort keys (unique prefixes are accepted):
stdname -- standard name
nfl -- name/file/line
pcalls -- call count
file -- file name
calls -- call count
time -- internal time
line -- line number
cumulative -- cumulative time
module -- file name
name -- function name
%
msg98303 - (view) Author: Mitchell Model (MLModel) Date: 2010-01-25 23:59
Still true in 3.1
msg102180 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2010-04-02 17:05
Thanks for your bug report and patch!

The original 2.x version was pretty ugly code with a lambda that used default arguments, so I rewrote the line to be more modern; it now does 
' all((x in abbrevs) for x in line.split())'.

Committed my version to trunk to r79603, and to 3.x trunk in r79604.

(A lot of pstats.py is pretty old-looking and could be tied up.)
History
Date User Action Args
2010-04-02 17:05:10akuchlingsetstatus: open -> closed
files: + pstats-simplify.diff

assignee: akuchling

nosy: + akuchling
messages: + msg102180
resolution: fixed
2010-01-26 01:39:20brian.curtinsetpriority: normal
keywords: + needs review
stage: test needed
2010-01-25 23:59:28MLModelsetnosy: + MLModel

messages: + msg98303
versions: + Python 3.1, - Python 3.0
2008-11-26 15:00:50marcin.bachrycreate