This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: add new function, sys.gettrace
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: brett.cannon, georg.brandl, gvanrossum, titus
Priority: normal Keywords: patch

Created on 2007-12-18 07:16 by titus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
gettrace.diff titus, 2007-12-18 07:16
gettrace+getprofile.diff titus, 2007-12-19 06:52
Messages (5)
msg58725 - (view) Author: Titus Brown (titus) Date: 2007-12-18 07:16
Currently there is no way to retrieve the current trace function; this
patch adds 'gettrace' to the sys module.

This behavior is very useful for helping to control code coverage
analysis tools.
msg58765 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-12-18 20:14
Why not do the same for its cousin sys.setprofile()?
msg58767 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2007-12-18 20:18
On Dec 18, 2007 12:14 PM, Guido van Rossum <> wrote:
> Guido van Rossum added the comment:
> Why not do the same for its cousin sys.setprofile()?

If Titus' code works out I was going to just copy it and tweak it for
profile functions.  Obviously if Titus wants to do that as well I
won't object.  =)
msg58794 - (view) Author: Titus Brown (titus) Date: 2007-12-19 06:52
Added getprofile + tests, docs, as per reasonable request ;)
msg61293 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-20 13:59
Committed as r60138. Thanks for the complete patch!
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 45989
2008-01-20 13:59:57georg.brandlsetstatus: open -> closed
assignee: brett.cannon -> georg.brandl
resolution: accepted
messages: + msg61293
nosy: + georg.brandl
2007-12-19 06:52:24titussetfiles: + gettrace+getprofile.diff
messages: + msg58794
2007-12-18 20:18:00brett.cannonsetmessages: + msg58767
2007-12-18 20:14:18gvanrossumsetnosy: + gvanrossum
messages: + msg58765
2007-12-18 08:52:30brett.cannonsetassignee: brett.cannon
2007-12-18 08:19:40christian.heimessetpriority: normal
keywords: + patch
type: behavior -> enhancement
2007-12-18 07:16:46tituscreate