> For the complete documentation index, see [llms.txt](https://treasuremaster.gitbook.io/python-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://treasuremaster.gitbook.io/python-docs/moduli-standartnoi-biblioteki-1/obshie-sluzhby-operacionnoi-sistemy/io/io.textiobase.md).

# io.TextIOBase

#### class io.TextIOBase

Базовый класс для текстовых потоков. Этот класс предоставляет символьный и строковый интерфейс для потокового ввода-вывода. Он наследует IOBase. Общедоступного конструктора нет.

**TextIOBase** предоставляет или переопределяет эти атрибуты данных и методы в дополнение к атрибутам IOBase:

* encoding
* errors
* newlines
* buffer
* detach ()
* [read ()](/python-docs/moduli-standartnoi-biblioteki-1/obshie-sluzhby-operacionnoi-sistemy/io/io.textiobase/io.textiobase.read.md) - читает и возвращает заданное количество символов из строки (или весь текст)
* [readline ()](https://treasuremaster.gitbook.io/python-docs/obshie-sluzhby-operacionnoi-sistemy/io/io.textiobase/io.textiobase.readline) - читает до новой строки или EOF и возвращает одну строку
* [seek ()](/python-docs/moduli-standartnoi-biblioteki-1/obshie-sluzhby-operacionnoi-sistemy/io/io.textiobase/io.textiobase.seek.md) - меняет положение указателя потока на заданное смещение
* tell ()
* [write ()](https://treasuremaster.gitbook.io/python-docs/obshie-sluzhby-operacionnoi-sistemy/io/io.textiobase/io.textiobase.write) - пишет строку в поток и возвращает количество записанных символов


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://treasuremaster.gitbook.io/python-docs/moduli-standartnoi-biblioteki-1/obshie-sluzhby-operacionnoi-sistemy/io/io.textiobase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
