Tk\_InitConsoleChannels(3) Tk Library Procedures Tk\_InitConsoleChannels(3)

```

```

# [NAME](#NAME)

Tk\_InitConsoleChannels - Install the console channels as standard channels

# [SYNOPSIS](#SYNOPSIS)

```
#include <tk.h>

Tk_InitConsoleChannels(interp)
```

# [ARGUMENTS](#ARGUMENTS)

Tcl\_Interp *\*interp* (in)

Interpreter in which the console channels are created.

```
    
```

# [DESCRIPTION](#DESCRIPTION)

**Tk\_InitConsoleChannels** is invoked to create a set of console channels and install them as the standard channels. All I/O on these channels will be discarded until **Tk\_CreateConsoleWindow** is called to attach the console to a text widget.

This function is for use by shell applications based on Tk, like **wish**, on platforms which have no standard channels in graphical mode, like Win32.

The *interp* argument is the interpreter in which to create and install the console channels.

**NOTE:** If this function is used it has to be called before the first call to **Tcl\_RegisterChannel**, directly, or indirectly through other channel functions. Because otherwise the standard channels will be already initialized to the system defaults, which will be nonsensical for the case **Tk\_InitConsoleChannels** is for.

# [SEE ALSO](#SEE_ALSO)

[console(n)](/man/os/tk/console.n)

# [KEYWORDS](#KEYWORDS)

standard channels, console

8.5 Tk

---

Document: Tk_InitConsoleChannels(3) from tk 9.0.4-r2 (Chainguard OS)
Source: https://downloads.sourceforge.net/sourceforge/tcl/tk9.0.4-src.tar.gz
