The fconfigure Command
The fconfigure command sets and queries several properties of I/O channels. The default settings for channels are suitable for most cases. If you do event-driven I/O you may want to set your channel into nonblocking mode. If you handle binary data, you should turn off end of line and character set translations. You can query the channel parameters like this:
fconfigure stdin -blocking 1 -buffering none -buffersize 4096 -encoding iso8859-1 -eofchar {}-translation lf
Table 16-3 summarizes the properties controlled by fconfigure. They are discussed in more detail below.
-blocking | Blocks until I/O channel is ready: 0 or 1. |
-buffering | Buffer mode: none, line, or full ... |
Get Practical Programming in Tcl & Tk, Third Edition 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.