Exporting dates properly formatted on Google Appengine in Python

Posted by Chris M on Stack Overflow See other posts from Stack Overflow or by Chris M
Published on 2010-05-12T11:49:40Z Indexed on 2010/05/12 11:54 UTC
Read the original article Hit count: 246

Filed under:
|

I think this is right but google appengine seems to get to a certain point and cop-out; Firstly is this code actually right; and secondly is there away to skip the record if it cant output (like an ignore errors and continue)?

class TrackerExporter(bulkloader.Exporter):
    def __init__(self):
        bulkloader.Exporter.__init__(self, 'SearchRec',
                                     [('__key__', lambda key:key.name(), None),
                                    ('WebSite', str, None),
                                    ('DateStamp', lambda x: datetime.datetime.strptime(x, '%d-%m-%Y').date(), None),
                                    ('IP', str, None),
                                    ('UserAgent', str, None)])

Thanks

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about python