def strptime(date):
 d = {'year': date[0:4], 'month': date[5:7], 'day': date[8:10], 'hour': date[11:13], 'minute': date[14:16], 'second': date[17:]}
 d = dict(((k, int(v)) for (k, v) in d.iteritems()))
 return datetime(**d)

def strptime ( date ) : d = { 'year' : date [ 0 : 4 ] , 'month' : date [ 5 : 7 ] , 'day' : date [ 8 : 10 ] , 'hour' : date [ 11 : 13 ] , 'minute' : date [ 14 : 16 ] , 'second' : date [ 17 : ] } d = dict ( ( ( k , int ( v ) ) for ( k , v ) in d . iteritems ( ) ) ) return datetime ( ** d )
parse a time string to datetime .