[Python-checkins] python/dist/src/Doc/tut tut.tex,1.202,1.203

fdrake at users.sourceforge.net fdrake at users.sourceforge.net
Wed Sep 10 22:28:16 EDT 2003


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory sc8-pr-cvs1:/tmp/cvs-serv18860

Modified Files:
	tut.tex 
Log Message:
- add several links into the library reference
- update a couple of URLs to point to more recent portions of
  python.org


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.202
retrieving revision 1.203
diff -C2 -d -r1.202 -r1.203
*** tut.tex	30 Aug 2003 23:21:32 -0000	1.202
--- tut.tex	11 Sep 2003 04:28:13 -0000	1.203
***************
*** 330,346 ****
  encoding.  The list of possible encodings can be found in the
  \citetitle[../lib/lib.html]{Python Library Reference}, in the section
! on \module{codecs}.
  
! If your editor supports saving files as \code{UTF-8} with an UTF-8
! signature (aka BOM -- Byte Order Mark), you can use that instead of an
  encoding declaration. IDLE supports this capability if
  \code{Options/General/Default Source Encoding/UTF-8} is set. Notice
  that this signature is not understood in older Python releases (2.2
  and earlier), and also not understood by the operating system for
! \code{\#!} files. 
  
  By using UTF-8 (either through the signature or an encoding
  declaration), characters of most languages in the world can be used
! simultaneously in string literals and comments. Using non-ASCII
  characters in identifiers is not supported. To display all these
  characters properly, your editor must recognize that the file is
--- 330,346 ----
  encoding.  The list of possible encodings can be found in the
  \citetitle[../lib/lib.html]{Python Library Reference}, in the section
! on \ulink{\module{codecs}}{../lib/module-codecs.html}.
  
! If your editor supports saving files as \code{UTF-8} with a UTF-8
! \emph{byte order mark} (aka BOM), you can use that instead of an
  encoding declaration. IDLE supports this capability if
  \code{Options/General/Default Source Encoding/UTF-8} is set. Notice
  that this signature is not understood in older Python releases (2.2
  and earlier), and also not understood by the operating system for
! \code{\#!} files.
  
  By using UTF-8 (either through the signature or an encoding
  declaration), characters of most languages in the world can be used
! simultaneously in string literals and comments. Using non-\ASCII
  characters in identifiers is not supported. To display all these
  characters properly, your editor must recognize that the file is
***************
*** 880,884 ****
  The latter two are variable-length encodings that store each Unicode
  character in one or more bytes. The default encoding is
! normally set to ASCII, which passes through characters in the range
  0 to 127 and rejects any other characters with an error.
  When a Unicode string is printed, written to a file, or converted
--- 880,884 ----
  The latter two are variable-length encodings that store each Unicode
  character in one or more bytes. The default encoding is
! normally set to \ASCII, which passes through characters in the range
  0 to 127 and rejects any other characters with an error.
  When a Unicode string is printed, written to a file, or converted
***************
*** 2394,2398 ****
  attempt to load the script as a module when that module is imported.
  This will generally be an error.  See section~\ref{standardModules},
! ``Standard Modules.'' for more information.
  
  
--- 2394,2398 ----
  attempt to load the script as a module when that module is imported.
  This will generally be an error.  See section~\ref{standardModules},
! ``Standard Modules,'' for more information.
  
  
***************
*** 2460,2466 ****
  
  \item
! The module \module{compileall}\refstmodindex{compileall} can create
! \file{.pyc} files (or \file{.pyo} files when \programopt{-O} is used) for
! all modules in a directory.
  
  \end{itemize}
--- 2460,2467 ----
  
  \item
! The module \ulink{\module{compileall}}{../lib/module-compileall.html}%
! {} \refstmodindex{compileall} can create \file{.pyc} files (or
! \file{.pyo} files when \programopt{-O} is used) for all modules in a
! directory.
  
  \end{itemize}
***************
*** 2479,2483 ****
  the \module{amoeba} module is only provided on systems that somehow
  support Amoeba primitives.  One particular module deserves some
! attention: \module{sys}\refstmodindex{sys}, which is built into every
  Python interpreter.  The variables \code{sys.ps1} and
  \code{sys.ps2} define the strings used as primary and secondary
--- 2480,2485 ----
  the \module{amoeba} module is only provided on systems that somehow
  support Amoeba primitives.  One particular module deserves some
! attention: \ulink{\module{sys}}{../lib/module-sys.html}%
! \refstmodindex{sys}, which is built into every 
  Python interpreter.  The variables \code{sys.ps1} and
  \code{sys.ps2} define the strings used as primary and secondary
***************
*** 2762,2773 ****
  
  The submodules often need to refer to each other.  For example, the
! \module{surround} module might use the \module{echo} module.  In fact, such references
! are so common that the \code{import} statement first looks in the
  containing package before looking in the standard module search path.
  Thus, the surround module can simply use \code{import echo} or
  \code{from echo import echofilter}.  If the imported module is not
  found in the current package (the package of which the current module
! is a submodule), the \code{import} statement looks for a top-level module
! with the given name.
  
  When packages are structured into subpackages (as with the
--- 2764,2776 ----
  
  The submodules often need to refer to each other.  For example, the
! \module{surround} module might use the \module{echo} module.  In fact,
! such references
! are so common that the \keyword{import} statement first looks in the
  containing package before looking in the standard module search path.
  Thus, the surround module can simply use \code{import echo} or
  \code{from echo import echofilter}.  If the imported module is not
  found in the current package (the package of which the current module
! is a submodule), the \keyword{import} statement looks for a top-level
! module with the given name.
  
  When packages are structured into subpackages (as with the
***************
*** 2779,2791 ****
  Sound.Effects import echo}.
  
- %(One could design a notation to refer to parent packages, similar to
- %the use of ".." to refer to the parent directory in \UNIX{} and Windows
- %filesystems.  In fact, the \module{ni} module, which was the
- %ancestor of this package system, supported this using \code{__} for
- %the package containing the current module,
- %\code{__.__} for the parent package, and so on.  This feature was dropped
- %because of its awkwardness; since most packages will have a relative
- %shallow substructure, this is no big loss.)
- 
  \subsection{Packages in Multiple Directories}
  
--- 2782,2785 ----
***************
*** 3124,3128 ****
  Rather than have users be constantly writing and debugging code to
  save complicated data types, Python provides a standard module called
! \module{pickle}.  This is an amazing module that can take almost
  any Python object (even some forms of Python code!), and convert it to
  a string representation; this process is called \dfn{pickling}.  
--- 3118,3123 ----
  Rather than have users be constantly writing and debugging code to
  save complicated data types, Python provides a standard module called
! \ulink{\module{pickle}}{../lib/module-pickle.html}.  This is an
! amazing module that can take almost
  any Python object (even some forms of Python code!), and convert it to
  a string representation; this process is called \dfn{pickling}.  
***************
*** 3149,3158 ****
  (There are other variants of this, used when pickling many objects or
  when you don't want to write the pickled data to a file; consult the
! complete documentation for \module{pickle} in the Library Reference.)
  
! \module{pickle} is the standard way to make Python objects which can
! be stored and reused by other programs or by a future invocation of
! the same program; the technical term for this is a
! \dfn{persistent} object.  Because \module{pickle} is so widely used,
  many authors who write Python extensions take care to ensure that new
  data types such as matrices can be properly pickled and unpickled.
--- 3144,3156 ----
  (There are other variants of this, used when pickling many objects or
  when you don't want to write the pickled data to a file; consult the
! complete documentation for
! \ulink{\module{pickle}}{../lib/module-pickle.html} in the
! \citetitle[../lib/]{Python Library Reference}.)
  
! \ulink{\module{pickle}}{../lib/module-pickle.html} is the standard way
! to make Python objects which can be stored and reused by other
! programs or by a future invocation of the same program; the technical
! term for this is a \dfn{persistent} object.  Because
! \ulink{\module{pickle}}{../lib/module-pickle.html} is so widely used,
  many authors who write Python extensions take care to ensure that new
  data types such as matrices can be properly pickled and unpickled.
***************
*** 4357,4362 ****
  bunch of Python-related personal home pages; many people have
  downloadable software there. Many more user-created Python modules
! can be found in a third-party repository at
! \url{http://www.vex.net/parnassus}.
  
  For Python-related questions and problem reports, you can post to the
--- 4355,4360 ----
  bunch of Python-related personal home pages; many people have
  downloadable software there. Many more user-created Python modules
! can be found in the \ulink{Python Package
! Index}{http://www.python.org/pypi} (PyPI).
  
  For Python-related questions and problem reports, you can post to the
***************
*** 4371,4376 ****
  asking (and answering) questions, suggesting new features, and
  announcing new modules.  Before posting, be sure to check the list of
! Frequently Asked Questions (also called the FAQ), at
! \url{http://www.python.org/doc/FAQ.html}, or look for it in the
  \file{Misc/} directory of the Python source distribution.  Mailing
  list archives are available at \url{http://www.python.org/pipermail/}.
--- 4369,4373 ----
  asking (and answering) questions, suggesting new features, and
  announcing new modules.  Before posting, be sure to check the list of
! \ulink{Frequently Asked Questions}{http://www.python.org/doc/faq/} (also called the FAQ), or look for it in the
  \file{Misc/} directory of the Python source distribution.  Mailing
  list archives are available at \url{http://www.python.org/pipermail/}.
***************
*** 4499,4503 ****
  the interactive commands, and removing the names avoids creating side
  effects in the interactive environments.  You may find it convenient
! to keep some of the imported modules, such as \module{os}, which turn
  out to be needed in most sessions with the interpreter.
  
--- 4496,4501 ----
  the interactive commands, and removing the names avoids creating side
  effects in the interactive environments.  You may find it convenient
! to keep some of the imported modules, such as
! \ulink{\module{os}}{../lib/module-os.html}, which turn
  out to be needed in most sessions with the interpreter.
  





More information about the Python-checkins mailing list