def _Strptime(arg, strptime_format):
 split_arg = arg.split('.')
 datetime_obj = datetime.datetime.strptime(split_arg[0], strptime_format)
 if (len(split_arg) == 2):
  datetime_obj = datetime_obj.replace(microsecond=int(split_arg[1]))
 return datetime_obj

def _Strptime ( arg , strptime_format ) : split_arg = arg . split ( '.' ) datetime_obj = datetime . datetime . strptime ( split_arg [ 0 ] , strptime_format ) if ( len ( split_arg ) == 2 ) : datetime_obj = datetime_obj . replace ( microsecond = int ( split_arg [ 1 ] ) ) return datetime_obj
wraps strptime to provide microsecond support on python 2 .