Chapter 7. Input and Output

Tango offers a broad range of functionality for handling input/output (I/O). In this chapter, we introduce four principal features of the tango.io package:

  • Console I/O

  • Stream I/O

  • Network I/O

  • File handling.

First, let's get a couple of definitions out of the way. If you already familiar with the notion of streams, feel free to skip ahead.

Tango I/O is primarily stream-oriented. A stream represents a contiguous flow of data without any particular format or discernible feature. Applications may subsequently apply type or semantic structure (meaning) to the data, perhaps treating it as a set of records or lines of text. However, the flow is just a meaningless set of bytes at the raw stream level. Perhaps one common characteristic ...

Get Learn to Tango with D now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.