[Python-checkins] CVS: python/dist/src/Doc/lib tkinter.tex,NONE,1.1

Fred L. Drake fdrake@users.sourceforge.net
Thu, 15 Nov 2001 09:22:06 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv31150/lib

Added Files:
	tkinter.tex 
Log Message:
Tkinter chapter, contributed by Mike Clarkson.  Based in part on the "Tkinter
Life Preserver" by Matt Conway.


--- NEW FILE: tkinter.tex ---
\chapter{Graphical User Interface Modules \label{gui}}

\index{GUI}
\index{Graphical User Interface}
\index{Tkinter}
\index{Tk}

Tk/Tcl has long been an integral part of Python.  It provides a robust
and platform independent windowing toolkit, that is available to
Python programmers using the \refmodule{Tkinter} module, and its
extension, the \refmodule{Tix} module.

\refmodule{Tkinter} is a thin object--oriented layer on top of
Tcl/Tk. To use \refmodule{Tkinter}, you don't need to write Tcl code,
but you will need to consult the Tk documentation, and occasionally
the Tcl documentation.  \refmodule{Tkinter} is a set of wrappers that
implement the Tk widgets as Python classes.  In addition, the internal
module \module{\_tkinter} provides a threadsafe mechanism which allows
Python and Tcl to interact.
[...1635 lines suppressed...]

If there are arguments:

\begin{enumerate}
\item   If \programopt{-e} is used, arguments are files opened for
        editing and \code{sys.argv} reflects the arguments passed to
        IDLE itself.

\item   Otherwise, if \programopt{-c} is used, all arguments are
        placed in \code{sys.argv[1:...]}, with \code{sys.argv[0]} set
        to \code{'-c'}.

\item   Otherwise, if neither \programopt{-e} nor \programopt{-c} is
        used, the first argument is a script which is executed with
        the remaining arguments in \code{sys.argv[1:...]}  and
        \code{sys.argv[0]} set to the script name.  If the script name
        is '-', no script is executed but an interactive Python
        session is started; the arguments are still available in
        \code{sys.argv}.
\end{enumerate}