Skip to content

Instantly share code, notes, and snippets.

@westhood
Created March 29, 2013 06:00
Show Gist options
  • Select an option

  • Save westhood/5269016 to your computer and use it in GitHub Desktop.

Select an option

Save westhood/5269016 to your computer and use it in GitHub Desktop.
print stack frames of a greenlet in gevent
def print_frames(greenlet):
f = greenlet.gr_frame
while f:
print f.f_code, f.f_locals
f = f.f_back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment