def __init__(self, string=None, **kwargs):
        """Table2array(string) --> parser

        :Arguments:
           *string*
              string to be parsed
           *filename*
              read from *filename* instead of string
           *autoconvert*
              EXPERIMENTAL. ``True``: replace certain values
              with special python values (see :class:`convert.Autoconverter`) and possibly
              split values into lists (see *sep*).
              ``False``: leave everything as it is (numbers as numbers and strings
              as strings).
           *mode*
              mode of the :class:`~convert.Autoconverter`
           *sep*
              If set and *autoconvert* = ``True`` then split field values on the
              separator (using :func:`split`) before possible autoconversion.
              (NOT WORKING PROPERLY YET)
        """
        self.filename = kwargs.pop('filename', None)
        if self.filename:
            with open(self.filename, 'rb') as f:
                string = "".join(f.readlines())  # encoding ??
        self.string = string
        m = TABLE.search(string)  # extract table from string with regular expression
        if m is None:
            raise ParseError('Table cannot be parsed.')
        self.t = m.groupdict()
        #: <NAME> of the table
        self.tablename = self.t['name']
        #: <CAPTION> of the table.
        self.caption = self.t['title']
        #: parsed table as records (populate with :meth:`Table2array.parse`)
        self.records = None
        self.names = None
        self.autoconvert = convert.Autoconverter(**kwargs).convert

        self.parse()
def __init__ ( self , string = None , ** kwargs ) : self . filename = kwargs . pop ( 'filename' , None ) if self . filename : with open ( self . filename , 'rb' ) as f : string = "" . join ( f . readlines ( ) ) self . string = string m = TABLE . search ( string ) if m is None : raise ParseError ( 'Table cannot be parsed.' ) self . t = m . groupdict ( ) self . tablename = self . t [ 'name' ] self . caption = self . t [ 'title' ] self . records = None self . names = None self . autoconvert = convert . Autoconverter ( ** kwargs ) . convert self . parse ( )
Table2array(string) --> parser

        :Arguments:
           *string*
              string to be parsed
           *filename*
              read from *filename* instead of string
           *autoconvert*
              EXPERIMENTAL. ``True``: replace certain values
              with special python values (see :class:`convert.Autoconverter`) and possibly
              split values into lists (see *sep*).
              ``False``: leave everything as it is (numbers as numbers and strings
              as strings).
           *mode*
              mode of the :class:`~convert.Autoconverter`
           *sep*
              If set and *autoconvert* = ``True`` then split field values on the
              separator (using :func:`split`) before possible autoconversion.
              (NOT WORKING PROPERLY YET)