.. _f-filetextbinary: module ``sql.file_text_binary`` =============================== .. inheritance-diagram:: pyensae.sql.file_text_binary Short summary +++++++++++++ module ``pyensae.sql.file_text_binary`` contains a class which opens a text file as a binary file. :githublink:`%|py|6` Classes +++++++ +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===========================================================+=========================================================================================================================+ | :class:`TextFile ` | This class opens a text file as if it were a binary file. It can deal with null characters which are missed by open ... | +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | method | truncated documentation | +===========================================================================================+=============================================================================================+ | :py:meth:`__init__ ` | | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`__iter__ ` | Iterator | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`_build_regex ` | Builds a regular expression. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`_count_s ` | Returns the number of every character in car. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`_get_type ` | Guesses the type of value s. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`_interpret ` | Splits a line into a list, separator ``\t``. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`_interpret_columns ` | Interprets the first line which contains the columns name. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :py:meth:`_load ` | load... | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`close ` | Closes the file. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`count_rejected_lines ` | Counts the number of rejected lines by regular expression exp. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`get_nb_readbytes ` | Returns the number of read bytes. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`get_nb_readlines ` | Returns the number of read lines. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`guess_columns ` | Guesses the columns type. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`join ` | Joins several files together. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`open ` | Opens the file in reading mode. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ | :meth:`readlines ` | Extracts all the lines, the file must not be opened through method open ``\n`` are removed. | +-------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyensae.sql.file_text_binary :members: :special-members: __init__ :show-inheritance: