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.

Author stefan
Recipients stefan
Date 2015-11-24.23:04:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1448406267.14.0.484592445826.issue25726@psf.upfronthosting.co.za>
In-reply-to
Content
I'm using the `cProfile` module to profile my code.

I tried to temporarily disable the profiler by using:

  prof = sys.getprofile()
  sys.setprofile(None)
  ...
   sys.setprofile(prof)

resulting in an error.

The reason is that with `cProfile`, `sys.getprofile` returns the profile object itself, which isn't suitable as argument for `sys.setprofile` (which expects a callable).

Notice that if I use the `profile` module instead of `cProfile`, the above works fine.
History
Date User Action Args
2015-11-24 23:04:27stefansetrecipients: + stefan
2015-11-24 23:04:27stefansetmessageid: <1448406267.14.0.484592445826.issue25726@psf.upfronthosting.co.za>
2015-11-24 23:04:27stefanlinkissue25726 messages
2015-11-24 23:04:27stefancreate