mainloop

This command is part of the TclX package.

mainloop

This procedure sets up a topā€level event loop. Events are processed until there are no more active event sources, at which time the process exits. It is used to build event oriented programs using the TclX shell in a style similar to that used with wish. If the global variable tcl_interactive exists and has a true value, an interactive command handler is started as well. If the command handler is terminated by an EOF, the process will be exited.

See also commandloop and vwait.