How to call a specific, unknown Python object attribute?

Posted by Michael Morisy on Stack Overflow See other posts from Stack Overflow or by Michael Morisy
Published on 2010-06-03T02:49:15Z Indexed on 2010/06/03 2:54 UTC
Read the original article Hit count: 205

Filed under:
|

I'm working to create a simple Python script that will ultimately tell you how many blog entries were posted in a given month, and the pyblog app is proving very helpful.

However, when I create the blog object, I don't know how to access it's various attributes. I can print them all out by printing one item from the dictionary, as shown (in excerpts) below:

print blog.get_recent_posts(1)

'post_status': 'publish', 'date_created_gmt': <DateTime '20100601T19:27:17' at 2853300>,
'mt_excerpt': '', 'userid': '288', 'dateCreated': <DateTime '20100601T14:27:17' at 2853350>,
'custom_fields': [{'value': '', 'id': '1317', 'key': 'brightcove_code'}, 
{'value': 'http://bit.ly/d0Rywl', 'id': '1403', 

But how can I just get it to provide that DateTime information?

© Stack Overflow or respective owner

Related posts about python

Related posts about xmlrpc