Kaydet (Commit) c0b194a7 authored tarafından Johannes Gijsbers's avatar Johannes Gijsbers

Bug #489256: remove out of date and out of place profile.doc, and let

profile.help() point at the library reference instead of profile.doc.
üst 77ead87f
This diff is collapsed.
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
# #
# Based on prior profile module by Sjoerd Mullender... # Based on prior profile module by Sjoerd Mullender...
# which was hacked somewhat by: Guido van Rossum # which was hacked somewhat by: Guido van Rossum
#
# See profile.doc for more information
"""Class for profiling Python code.""" """Class for profiling Python code."""
...@@ -94,18 +92,10 @@ def runctx(statement, globals, locals, filename=None): ...@@ -94,18 +92,10 @@ def runctx(statement, globals, locals, filename=None):
else: else:
return prof.print_stats() return prof.print_stats()
# print help # Backwards compatibility.
def help(): def help():
for dirname in sys.path: print "Documentation for the profile module can be found "
fullname = os.path.join(dirname, 'profile.doc') print "in the Python Library Reference, section 'The Python Profiler'."
if os.path.exists(fullname):
sts = os.system('${PAGER-more} ' + fullname)
if sts: print '*** Pager exit status:', sts
break
else:
print 'Sorry, can\'t find the help file "profile.doc"',
print 'along the Python search path.'
if os.name == "mac": if os.name == "mac":
import MacOS import MacOS
......
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