'Write ``table`` as list of strings.
Parameters
table : `~astropy.table.Table`
Input table data
Returns
lines : list
List of strings corresponding to ASCII table'

def write(self, table):

    self.data.fill_values.append((core.masked, 'null'))
    self.header.cols = list(six.itervalues(table.columns))
    self.header.check_column_names(self.names, self.strict_names, self.guessing)
    core._apply_include_exclude_names(table, self.names, self.include_names, self.exclude_names)
    new_cols = list(six.itervalues(table.columns))
    self.header.cols = new_cols
    self.data.cols = new_cols
    lines = []
    if ('comments' in table.meta):
        for comment in table.meta['comments']:
            if (len(str(comment)) > 78):
                warn('Comment    string    >    78    characters    was    automatically    wrapped.', AstropyUserWarning)
            for line in wrap(str(comment), 80, initial_indent='\\    ', subsequent_indent='\\    '):
                lines.append(line)
    if ('keywords' in table.meta):
        keydict = table.meta['keywords']
        for keyword in keydict:
            try:
                val = keydict[keyword]['value']
                lines.append('\\{0}={1!r}'.format(keyword.strip(), val))
            except TypeError:
                warn("Table    metadata    keyword    {0}    has    been    skipped.        IPAC    metadata    must    be    in    the    form    {{'keywords':{{'keyword':    {{'value':    value}}    }}".format(keyword), AstropyUserWarning)
    ignored_keys = [key for key in table.meta if (key not in ('keywords', 'comments'))]
    if any(ignored_keys):
        warn("Table    metadata    keyword(s)    {0}    were    not    written.        IPAC    metadata    must    be    in    the    form    {{'keywords':{{'keyword':    {{'value':    value}}    }}".format(ignored_keys), AstropyUserWarning)
    self.data._set_fill_values(self.data.cols)
    for (i, col) in enumerate(table.columns.values()):
        col.headwidth = max([len(vals[i]) for vals in self.header.str_vals()])
    data_str_vals = []
    col_str_iters = self.data.str_vals()
    for vals in zip(*col_str_iters):
        data_str_vals.append(vals)
    for (i, col) in enumerate(table.columns.values()):
        if data_str_vals:
            col.width = max([len(vals[i]) for vals in data_str_vals])
        else:
            col.width = 0
    widths = [max(col.width, col.headwidth) for col in table.columns.values()]
    self.header.write(lines, widths)
    self.data.write(lines, widths, data_str_vals)
    return lines
