summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-07-30 10:21:13 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-07-30 10:21:13 (GMT)
commit27c430e54e624fa1ad943077b9001c280f91761f (patch)
treeba9b8d38bcc4030c24ea83577cd04351fedfc526 /Lib
parenta1fd0505aff09b31bbfb1ca8d1b1a9ba5778ba34 (diff)
downloadcpython-27c430e54e624fa1ad943077b9001c280f91761f.zip
cpython-27c430e54e624fa1ad943077b9001c280f91761f.tar.gz
cpython-27c430e54e624fa1ad943077b9001c280f91761f.tar.bz2
Patch #445538: add completion for pstats.py sort cmd.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pstats.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 20a6cd1..4fd55c8 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -640,6 +640,8 @@ if __name__ == '__main__':
def help_sort(self):
print "Sort profile data according to specified keys."
print "(Typing `sort' without arguments lists valid keys.)"
+ def complete_sort(self, text, *args):
+ return [a for a in Stats.sort_arg_dict_default.keys() if a.startswith(text)]
def do_stats(self, line):
return self.generic('print_stats', line)