Skip to content

Instantly share code, notes, and snippets.

@nhomar
Created February 11, 2016 19:24
Show Gist options
  • Select an option

  • Save nhomar/b7486f3067d109074cc4 to your computer and use it in GitHub Desktop.

Select an option

Save nhomar/b7486f3067d109074cc4 to your computer and use it in GitHub Desktop.
Get all attributes of an object.
print dir(invoice.ups)
for e in dir(invoice.ups):
if not e.startswith('__'):
print '---- attr: ', e
print type(invoice.ups.__getattribute__(e))
print invoice.ups.__getattribute__(e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment