Skip to content

Instantly share code, notes, and snippets.

@seekshreyas
Created July 3, 2013 21:29
Show Gist options
  • Select an option

  • Save seekshreyas/5923001 to your computer and use it in GitHub Desktop.

Select an option

Save seekshreyas/5923001 to your computer and use it in GitHub Desktop.
For debugging in python: Print attributes of an object in python
def print_attributes(obj):
for attr in obj.__dict__:
print attr, getattr(obj, attr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment