'sets up an output module, be sure to call Output.__init__ first or last
args will have the name of the module as args[0], anything else after'

def __init__(self, *args, **kwargs):

    self.fields = self._DEFAULT_FIELDS
    if ('format' in kwargs):
        self.fields = []
        fmtstr = kwargs['format']
        del kwargs['format']
    else:
        fmtstr = ''
    if ('delim' in kwargs):
        self.delim = kwargs['delim']
        if (self.delim.lower() == 'tab'):
            self.delim = ' DCTB '
    else:
        self.delim = self._DEFAULT_DELIM
    self.noheader = ('noheader' in kwargs)
    if len(args):
        for a in args:
            try:
                (f, t) = a.split(':')
            except:
                (f, t) = (a, 's')
            self.fields.append((f, t))
    if fmtstr:
        fmtstr += self.delim
    fmtstr += self.delim.join([('%%(%s)%s' % (f, t)) for (f, t) in self.fields])
    output.TextOutput.__init__(self, format=fmtstr, **kwargs)
