sys.getprofile()

sys.getprofile()

Return the profiling function set with sys.setprofile. See the profiler chapter in the library manual.