def _copy_from_to(from_file, to_file):
 with pelican_open(from_file) as text_in:
  encoding = 'utf-8'
  with open(to_file, 'w', encoding=encoding) as text_out:
   text_out.write(text_in)
   logger.info('Writing %s', to_file)

def _copy_from_to ( from_file , to_file ) : with pelican_open ( from_file ) as text_in : encoding = 'utf-8' with open ( to_file , 'w' , encoding = encoding ) as text_out : text_out . write ( text_in ) logger . info ( 'Writing %s' , to_file )
a very rough and ready copy from / to function .