[issue25726] sys.setprofile / sys.getprofile asymetry

2016-02-13 Thread Georg Brandl
Georg Brandl added the comment: Ok, this is because internally, sys.setprofile (or to be exact, PyEval_SetProfile) sets two things: a C function, and a "profileobj", which is the argument to setprofile(). sys.setprofile sets the C function to the "profile_trampoline", which supports calling

[issue25726] sys.setprofile / sys.getprofile asymetry

2016-02-12 Thread Ned Deily
Changes by Ned Deily : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list

[issue25726] sys.setprofile / sys.getprofile asymetry

2015-11-24 Thread Stefan Seefeld
New submission from Stefan Seefeld: 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`,