summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-20 13:59:46 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-20 13:59:46 (GMT)
commit56112895d69131ee4f34d4e3e9406614313df57f (patch)
treeb57e176cd54df7984553c6337390ce1712fb2292 /Doc/library/sys.rst
parent92058d29334fcb4d01ae2ab7c165aba2ef6da2af (diff)
downloadcpython-56112895d69131ee4f34d4e3e9406614313df57f.zip
cpython-56112895d69131ee4f34d4e3e9406614313df57f.tar.gz
cpython-56112895d69131ee4f34d4e3e9406614313df57f.tar.bz2
#1648: add sys.gettrace() and sys.getprofile().
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index c6fe2fa..4b2ff4a 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -392,6 +392,35 @@ always available.
This function should be used for internal and specialized purposes only.
+.. function:: getprofile()
+
+ .. index::
+ single: profile function
+ single: profiler
+
+ Get the profiler function as set by :func:`setprofile`.
+
+ .. versionadded:: 2.6
+
+
+.. function:: gettrace()
+
+ .. index::
+ single: trace function
+ single: debugger
+
+ Get the trace function as set by :func:`settrace`.
+
+ .. note::
+
+ The :func:`gettrace` function is intended only for implementing debuggers,
+ profilers, coverage tools and the like. Its behavior is part of the
+ implementation platform, rather than part of the language definition,
+ and thus may not be available in all Python implementations.
+
+ .. versionadded:: 2.6
+
+
.. function:: getwindowsversion()
Return a tuple containing five components, describing the Windows version