Guest User

Untitled

a guest
Apr 17th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. from cProfile import runctx
  2. def profile_decorator(fun):
  3. def wrap(*args, **kw):
  4. globals()['funct'] = fun
  5. result = []
  6. runctx('result.append(funct(*args, **kw))', globals(), locals())
  7. #return funct(*args, **kw)
  8. return result[0]
  9. return wrap
Add Comment
Please, Sign In to add comment