# BaseInputter¶

class astropy.io.ascii.BaseInputter[source]

Bases: object

Get the lines from the table input and return a list of lines.

Attributes Summary

 encoding Encoding used to read the file

Methods Summary

 get_lines(self, table) Get the lines from the table input. process_lines(self, lines) Process lines for subsequent use.

Attributes Documentation

encoding = None

Encoding used to read the file

Methods Documentation

get_lines(self, table)[source]

Get the lines from the table input. The input table can be one of:

• File name

• String (newline separated) with all header and data lines (must have at least 2 lines)

• File-like object with read() method

• List of strings

Parameters
tablestr, file_like, list

Can be either a file name, string (newline separated) with all header and data lines (must have at least 2 lines), a file-like object with a read() method, or a list of strings.

Returns
lineslist

List of lines

process_lines(self, lines)[source]

Process lines for subsequent use. In the default case do nothing. This routine is not generally intended for removing comment lines or stripping whitespace. These are done (if needed) in the header and data line processing.

Override this method if something more has to be done to convert raw input lines to the table rows. For example the ContinuationLinesInputter derived class accounts for continuation characters if a row is split into lines.