Short for pseudo teletype, but more commonly referred to as a pseudo terminal.
A pseudo terminal is a pair of character devices, a master device, and a slave device. These allow communication between an application process and a server process. When sending data to pty devices (such as windows), a pty device must exist for every window that is open at any given time.
Also see expect, a Tcl extension which deals nicely with ptys on UNIX. Alas, on Windows things are a bit problematic. And on other Operating Systems, things can be even worse...
Helmut Giese provides in clt Tcl source for pty management [L1 ]; Don Libes points out that this is less portable than one might hope.