def write(records, logfile, time_format):
  try:
    open(logfile, 'w').write('\n'.join(
      [server.record_to_txt(record, time_format) for record in records]))
  except IOError:
    print "error: could not open log file for writing: %s" % logfile
dataset/ETHPy150Open adeel/timed/timed/client.py/write/original