def FileWriter(context):
 if (context.format == context.html_format):
  return HtmlFileWriter(context)
 if (context.format == context.tsv_format):
  return TsvFileWriter(context)
 if context.pipe_separated:
  return PipeSeparatedTxtWriter(context)
 return SpaceSeparatedTxtWriter(context)

def FileWriter ( context ) : if ( context . format == context . html_format ) : return HtmlFileWriter ( context ) if ( context . format == context . tsv_format ) : return TsvFileWriter ( context ) if context . pipe_separated : return PipeSeparatedTxtWriter ( context ) return SpaceSeparatedTxtWriter ( context )
creates and returns a filewriter object .