import logging


def DumpFile( fname, contents, dbg = False, getio = None ):
    """Write out a file whose entire contents is the given string"""
    if getio: return dict( depends_on = (), creates = fname, attrs = dict( piperun_short = True ) )
    logging.info( 'Writing ' + fname  )
    with open( fname, 'wt' ) as f:
        f.write( str( contents ) )
    logging.info( 'Wrote ' + fname  )