- ![]()  |
- ![]()  |
- ![]()  |
-
+ |
Python Documentation |
- ![]()  |
- ![]()  |
- ![]()  |
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.aux
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.dvi
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.how
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.idx
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.l2h
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.log
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: inst.toc
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.aux
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.dvi
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.how
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.idx
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.l2h
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.log
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib.toc
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib2.syn
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: lib3.syn
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.aux
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.dvi
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.how
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.idx
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.l2h
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.log
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.pla
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac.toc
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac2.syn
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac3.syn
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: mac4.syn
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modapi.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: moddist.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: moddoc.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modext.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modinst.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modlib.idx
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modlib.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modmac.idx
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modmac.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modref.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: modtut.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.aux
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.dvi
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.how
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.idx
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.l2h
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.log
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: ref.toc
diff -ru main/contrib/python-2.0/dist/src/Doc/html/stdabout.dat main/Apps/ActivePython-2.0/src/Core/Doc/html/stdabout.dat
--- main/contrib/python-2.0/dist/src/Doc/html/stdabout.dat Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/html/stdabout.dat Mon Mar 12 16:10:18 2001
@@ -27,6 +27,12 @@
Comments and Questions
+
Comments on the ActivePython distribution should be directed to
+ ActivePython@ActiveState.com.
+ For the latest news on ActivePython, visit the ActivePython homepage at
+ www.ActiveState.com/Products/ActivePython.
+
+
General comments and questions regarding this document should
be sent by email to python-docs@python.org. If you find specific errors in
diff -ru main/contrib/python-2.0/dist/src/Doc/html/style.css main/Apps/ActivePython-2.0/src/Core/Doc/html/style.css
--- main/contrib/python-2.0/dist/src/Doc/html/style.css Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/html/style.css Mon Mar 12 16:10:18 2001
@@ -3,12 +3,9 @@
* with the "empty" declarations removed.
*/
-/* Century Schoolbook font is very similar to Computer Modern Math: cmmi */
-.math { font-family: "Century Schoolbook", serif; }
-.math i { font-family: "Century Schoolbook", serif;
- font-weight: bold }
-.boldmath { font-family: "Century Schoolbook", serif;
- font-weight: bold }
+.math { font-family: serif; }
+.math i { font-family: serif; font-weight: bold }
+.boldmath { font-family: serif; font-weight: bold }
/* Implement both fixed-size and relative sizes: */
small.xtiny { font-size : xx-small }
@@ -28,56 +25,33 @@
* Netscape on Solaris otherwise doesn't get it right; they all end up
* the normal text size.
*/
+a:link { color:#B82619; }
+a:visited { color:#C2B266; }
+a:active { color: #000000; }
+body { font-family: verdana, arial, helvetica, sans-serif; font-size: small; }
+h1, h2, h3, h4, h5, h6 { font-family: verdana, arial, helvetica, sans-serif; font-weight: bold; }
+h1 { font-size: 180% }
+h2 { font-size: 150% }
+h3, h4 { font-size: 120% }
+code, tt { font-family: monospace }
+var { font-family: serif; font-style: italic; font-weight: normal }
-body { color: #000000;
- background-color: #ffffff; }
+.navigation { font-family: verdana, arial, helvetica, sans-serif; font-size: 110% }
-a:active { color: #ff0000; }
-a:visited { color: #551a8b; }
-a:link { color: #0000bb; }
-
-h1, h2, h3, h4, h5, h6 { font-family: avantgarde, sans-serif;
- font-weight: bold }
-h1 { font-size: 180% }
-h2 { font-size: 150% }
-h3, h4 { font-size: 120% }
-code, tt { font-family: monospace }
-var { font-family: serif;
- font-style: italic;
- font-weight: normal }
-
-.navigation td { background-color: #99ccff;
- font-weight: bold;
- font-family: avantgarde, sans-serif;
- font-size: 110% }
-
-.release-info { font-style: italic; }
-
-.titlegraphic { vertical-align: top; }
+.title { font-family: verdana, arial, helvetica, sans-serif; font-size: 110% }
.verbatim { color: #00008b }
-.email { font-family: avantgarde, sans-serif }
-.mimetype { font-family: avantgarde, sans-serif }
-.newsgroup { font-family: avantgarde, sans-serif }
-.url { font-family: avantgarde, sans-serif }
-.file { font-family: avantgarde, sans-serif }
-
-.tableheader { background-color: #99ccff;
- font-family: avantgarde, sans-serif; }
+.email { font-family: verdana, arial, helvetica, sans-serif }
+.mimetype { font-family: verdana, arial, helvetica, sans-serif }
+.newsgroup { font-family: verdana, arial, helvetica, sans-serif }
+.url { font-family: verdana, arial, helvetica, sans-serif }
+.file { font-family: verdana, arial, helvetica, sans-serif }
.refcount-info { font-style: italic }
-.refcount-info .value { font-weight: bold;
- color: #006600 }
+.refcount-info .value { font-weight: bold; color: #006600 }
-/*
- * Some decoration for the "See also:" blocks, in part inspired by some of
- * the styling on Lars Marius Garshol's XSA pages.
- * (The blue in the navigation bars is #99CCFF.)
- */
-.seealso { background-color: #fffaf0;
- border: thin solid black;
- padding: 4pt }
+.seealso { background-color: #EAE2BB; border: thin solid black; padding: 4pt }
.seealso .heading { font-size: 110% }
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.aux
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.dvi
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.how
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.ind
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.l2h
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.log
Only in main/Apps/ActivePython-2.0/src/Core/Doc/html: tut.toc
Only in main/contrib/python-2.0/dist/src/Doc: icons
diff -ru main/contrib/python-2.0/dist/src/Doc/info/Makefile main/Apps/ActivePython-2.0/src/Core/Doc/info/Makefile
--- main/contrib/python-2.0/dist/src/Doc/info/Makefile Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/info/Makefile Mon Mar 12 16:10:18 2001
@@ -1,7 +1,9 @@
# Generate the Python "info" documentation.
+PAPER=letter
TOPDIR=..
TOOLSDIR=$(TOPDIR)/tools
+PAPERDIR=$(TOPDIR)/paper-$(PAPER)
HTMLDIR=$(TOPDIR)/html
MKINFO=$(TOOLSDIR)/mkinfo
@@ -9,8 +11,7 @@
$(TOOLSDIR)/fixinfo.el
all: python-api.info python-ext.info python-lib.info \
- python-ref.info python-tut.info \
- python-dist.info python-inst.info
+ python-ref.info python-tut.info
python-api.info: $(HTMLDIR)/api/api.html $(SCRIPTS)
@@ -32,11 +33,6 @@
python-tut.info: $(HTMLDIR)/tut/tut.html $(SCRIPTS)
$(MKINFO) $<
-python-dist.info: $(HTMLDIR)/dist/dist.html $(SCRIPTS)
- $(MKINFO) $<
-
-python-inst.info: $(HTMLDIR)/inst/inst.html $(SCRIPTS)
- $(MKINFO) $<
clean:
rm -f *.texi~ *.texi
@@ -45,29 +41,42 @@
rm -f *.texi python-*.info python-*.info-[0-9]*
-# This makes sure we can build info files from a "clean" tree,
-# in case we haven't already built the HTML:
+# The HTML files are dependent on the .aux files, which are dependent on the
+# LaTeX source documents. This makes sure we can build info files from a
+# "clean" tree:
+
+$(HTMLDIR)/api/api.html: $(PAPERDIR)/api.aux $(BUILDINDEX)
+ (cd $(TOPDIR); $(MAKE) htmlapi)
+
+$(HTMLDIR)/ext/ext.html: $(PAPERDIR)/ext.aux
+ (cd $(TOPDIR); $(MAKE) htmlext)
+
+$(HTMLDIR)/lib/lib.html: $(PAPERDIR)/lib.aux $(BUILDINDEX)
+ (cd $(TOPDIR); $(MAKE) htmllib)
+
+$(HTMLDIR)/mac/mac.html: $(MACFILES) $(BUILDINDEX)
+ (cd $(TOPDIR); $(MAKE) htmlmac)
+
+$(HTMLDIR)/ref/ref.html: $(PAPERDIR)/ref.aux $(BUILDINDEX)
+ (cd $(TOPDIR); $(MAKE) htmlref)
-$(HTMLDIR)/api/api.html:
- (cd $(HTMLDIR); $(MAKE) api)
+$(HTMLDIR)/tut/tut.html: $(PAPERDIR)/tut.aux
+ (cd $(TOPDIR); $(MAKE) htmltut)
-$(HTMLDIR)/ext/ext.html:
- (cd $(HTMLDIR); $(MAKE) ext)
-$(HTMLDIR)/lib/lib.html:
- (cd $(HTMLDIR); $(MAKE) lib)
+include ../Makefile.deps
-$(HTMLDIR)/mac/mac.html:
- (cd $(HTMLDIR); $(MAKE) mac)
+$(PAPERDIR)/api.aux: $(APIFILES)
+ (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) api.dvi)
-$(HTMLDIR)/ref/ref.html:
- (cd $(HTMLDIR); $(MAKE) ref)
+$(PAPERDIR)/ext.aux: $(EXTFILES)
+ (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ext.dvi)
-$(HTMLDIR)/tut/tut.html:
- (cd $(HTMLDIR); $(MAKE) tut)
+$(PAPERDIR)/lib.aux: $(LIBFILES)
+ (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) lib.dvi)
-$(HTMLDIR)/dist/dist.html:
- (cd $(HTMLDIR); $(MAKE) dist)
+$(PAPERDIR)/ref.aux: $(REFFILES)
+ (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) ref.dvi)
-$(HTMLDIR)/inst/inst.html:
- (cd $(HTMLDIR); $(MAKE) inst)
+$(PAPERDIR)/tut.aux: $(TUTFILES)
+ (cd $(PAPERDIR); $(MAKE) PAPER=$(PAPER) tut.dvi)
diff -ru main/contrib/python-2.0/dist/src/Doc/inst/inst.tex main/Apps/ActivePython-2.0/src/Core/Doc/inst/inst.tex
--- main/contrib/python-2.0/dist/src/Doc/inst/inst.tex Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/inst/inst.tex Mon Mar 12 16:10:18 2001
@@ -1,4 +1,6 @@
\documentclass{howto}
+\usepackage{ltxmarkup}
+\usepackage{times}
\usepackage{distutils}
\title{Installing Python Modules}
@@ -41,14 +43,7 @@
%Abstract this!
%\end{abstract}
-
-% The ugly "%begin{latexonly}" pseudo-environment supresses the table
-% of contents for HTML generation.
-%
-%begin{latexonly}
\tableofcontents
-%end{latexonly}
-
\section{Introduction}
\label{intro}
@@ -120,7 +115,6 @@
setup script \file{setup.py}, and a \file{README.txt} (or possibly
\file{README}), which should explain that building and installing the
module distribution is a simple matter of running
-
\begin{verbatim}
python setup.py install
\end{verbatim}
@@ -146,20 +140,20 @@
are already familiar with how the Python library is laid out on their
platform, and know where to copy various files in order for Python to
find them. This document makes no such assumptions, and explains how
-the Python library is laid out on three major platforms (\UNIX, Windows,
-and MacOS), so that you can understand what happens when the Distutils
+the Python library is laid out on three major platforms (Unix, Windows,
+and Mac~OS), so that you can understand what happens when the Distutils
do their job \emph{and} know how to install modules manually when the
module author fails to provide a setup script.
Additionally, while there has not previously been a standard
installation mechanism, Python has had some standard machinery for
-building extensions on \UNIX{} since Python 1.4. This
-machinery (the \file{Makefile.pre.in} file) is superseded by the
-Distutils, but it will no doubt live on in older module distributions
-for a while. This \file{Makefile.pre.in} mechanism is documented in
-the \citetitle[../ext/ext.html]{Extending \& Embedding Python} manual,
-but that manual is aimed at module developers---hence, we include
-documentation for builders/installers here.
+building extensions on Unix since Python \XXX{version?}. This machinery
+(the \file{Makefile.pre.in} file) is superseded by the Distutils, but it
+will no doubt live on in older module distributions for a while. This
+\file{Makefile.pre.in} mechanism is documented in the ``Extending \&
+Embedding Python'' manual, but that manual is aimed at module
+developers---hence, we include documentation for builders/installers
+here.
All of the pre-Distutils material is tucked away in
section~\ref{pre-distutils}.
@@ -170,14 +164,12 @@
As described in section~\ref{new-standard}, building and installing
a module distribution using the Distutils is usually one simple command:
-
\begin{verbatim}
python setup.py install
\end{verbatim}
-
-On \UNIX, you'd run this command from a shell prompt; on Windows, you
+On Unix, you'd run this command from a shell prompt; on Windows, you
have to open a command prompt window (``DOS box'') and do it there; on
-MacOS, things are a tad more complicated (see below).
+Mac~OS, things are a tad more complicated (see below).
\subsection{Platform variations}
@@ -186,9 +178,8 @@
You should always run the setup command from the distribution root
directory, i.e. the top-level subdirectory that the module source
distribution unpacks into. For example, if you've just downloaded a
-module source distribution \file{foo-1.0.tar.gz} onto a
-\UNIX{} system, the normal thing to do is:
-
+module source distribution \file{foo-1.0.tar.gz} onto a Unix system, the
+normal thing to do is:
\begin{verbatim}
gunzip -c foo-1.0.tar.gz | tar xf - # unpacks into directory foo-1.0
cd foo-1.0
@@ -202,13 +193,12 @@
command-line tool (such as \program{unzip} or \program{pkunzip}) to
unpack the archive. Then, open a command prompt window (``DOS box''),
and run:
-
\begin{verbatim}
cd c:\Temp\foo-1.0
python setup.py install
\end{verbatim}
-On MacOS, you have to go through a bit more effort to supply
+On Mac~OS, you have to go through a bit more effort to supply
command-line arguments to the setup script:
\begin{itemize}
\item hit option-double-click on the script's icon (or option-drop it
@@ -219,9 +209,8 @@
voluminous and often useful)
\item when the command-line dialog pops up, enter ``install'' (you
can, of course, enter any Distutils command-line as described in this
- document or in \citetitle[../dist/dist.html]{Distributing Python
- Modules}: just leave off the initial \code{python setup.py} and
- you'll be fine)
+ document or in the ``Distributing Python Modules'' document: just
+ leave of the initial \code{python setup.py} and you'll be fine)
\end{itemize}
\XXX{this should change: every Distutils setup script will need
command-line arguments for every run (and should probably keep stdout
@@ -242,12 +231,10 @@
For example, you can build everything in one step, and then install
everything in a second step, by invoking the setup script twice:
-
\begin{verbatim}
python setup.py build
python setup.py install
\end{verbatim}
-
(If you do this, you will notice that running the \command{install}
command first runs the \command{build} command, which---in this
case---quickly notices that it has nothing to do, since everything in
@@ -269,33 +256,29 @@
concerned with speed, or want to keep the source tree pristine, you can
change the build directory with the \longprogramopt{build-base} option.
For example:
-
\begin{verbatim}
python setup.py build --build-base=/tmp/pybuild/foo-1.0
\end{verbatim}
-
(Or you could do this permanently with a directive in your system or
personal Distutils configuration file; see
section~\ref{config-files}.) Normally, this isn't necessary.
The default layout for the build tree is as follows:
-
\begin{verbatim}
--- build/ --- lib/
or
--- build/ --- lib./
temp./
\end{verbatim}
-
where \code{} expands to a brief description of the current
-OS/hardware platform and Python version. The first form, with just a
-\file{lib} directory, is used for ``pure module distributions''---that
-is, module distributions that include only pure Python modules. If a
-module distribution contains any extensions (modules written in C/\Cpp),
-then the second form, with two \code{} directories, is used. In
-that case, the \file{temp.\filevar{plat}} directory holds temporary
-files generated by the compile/link process that don't actually get
-installed. In either case, the \file{lib} (or
+OS/hardware platform. The first form, with just a \file{lib} directory,
+is used for ``pure module distributions''---that is, module
+distributions that include only pure Python modules. If a module
+distribution contains any extensions (modules written in C/C++, or Java
+for JPython), then the second form, with two \code{} directories,
+is used. In that case, the \file{temp.\filevar{plat}} directory holds
+temporary files generated by the compile/link process that don't
+actually get installed. In either case, the \file{lib} (or
\file{lib.\filevar{plat}}) directory contains all Python modules (pure
Python and extensions) that will be installed.
@@ -317,15 +300,15 @@
\code{setup.py install}---then the \command{install} command installs to
the standard location for third-party Python modules. This location
varies by platform and by how you built/installed Python itself. On
-\UNIX{} and MacOS, it also depends on whether the module distribution
+Unix and Mac OS, it also depends on whether the module distribution
being installed is pure Python or contains extensions (``non-pure''):
\begin{tableiv}{l|l|l|c}{textrm}%
{Platform}{Standard installation location}{Default value}{Notes}
- \lineiv{\UNIX{} (pure)}
+ \lineiv{Unix (pure)}
{\filenq{\filevar{prefix}/lib/python2.0/site-packages}}
{\filenq{/usr/local/lib/python2.0/site-packages}}
{(1)}
- \lineiv{\UNIX{} (non-pure)}
+ \lineiv{Unix (non-pure)}
{\filenq{\filevar{exec-prefix}/lib/python2.0/site-packages}}
{\filenq{/usr/local/lib/python2.0/site-packages}}
{(1)}
@@ -333,13 +316,13 @@
{\filenq{\filevar{prefix}}}
{\filenq{C:\textbackslash{}Python}}
{(2)}
- \lineiv{MacOS (pure)}
- {\filenq{\filevar{prefix}:Lib:site-packages}}
- {\filenq{Python:Lib:site-packages}}
+ \lineiv{Mac~OS (pure)}
+ {\filenq{\filevar{prefix}:Lib}}
+ {\filenq{Python:Lib} \XXX{???}}
{}
- \lineiv{MacOS (non-pure)}
- {\filenq{\filevar{prefix}:Lib:site-packages}}
- {\filenq{Python:Lib:site-packages}}
+ \lineiv{Mac~OS (non-pure)}
+ {\filevar{prefix}:Mac:PlugIns}
+ {\filenq{Python:Mac:PlugIns}\XXX{???}}
{}
\end{tableiv}
@@ -348,7 +331,7 @@
\item[(1)] Most Linux distributions include Python as a standard part of
the system, so \filevar{prefix} and \filevar{exec-prefix} are usually
both \file{/usr} on Linux. If you build Python yourself on Linux (or
- any \UNIX-like system), the default \filevar{prefix} and
+ any Unix-like system), the default \filevar{prefix} and
\filevar{exec-prefix} are \file{/usr/local}.
\item[(2)] The default installation directory on Windows was
\file{C:\textbackslash{}Program Files\textbackslash{}Python} under
@@ -357,12 +340,12 @@
\filevar{prefix} and \filevar{exec-prefix} stand for the directories
that Python is installed to, and where it finds its libraries at
-run-time. They are always the same under Windows and MacOS, and very
-often the same under \UNIX. You can find out what your Python
+run-time. They are always the same under Windows and Mac~OS, and very
+often the same under Unix. You can find out what your Python
installation uses for \filevar{prefix} and \filevar{exec-prefix} by
running Python in interactive mode and typing a few simple commands.
-Under \UNIX, just type \code{python} at the shell prompt; under Windows,
-run ``Python 2.0 (interpreter)'' \XXX{right?}; under MacOS, \XXX{???}.
+Under Unix, just type \code{python} at the shell prompt; under Windows,
+run ``Python 2.0 (interpreter)'' \XXX{right?}; under Mac~OS, \XXX{???}.
Once the interpreter is started, you type Python code at the
\samp{>>> } prompt. For example, on my Linux system, I type the three
Python statements shown below, and get the output as shown, to find
@@ -378,11 +361,9 @@
'/usr'
\end{verbatim}
-If you don't want to install modules to the standard location, or if you
-don't have permission to write there, then you need to read about
-alternate installations in section~\ref{alt-install}. If you want to
-customize your installation directories more heavily, see
-section~\ref{custom-install} on custom installations.
+If you don't want to install to the standard location, or if you don't
+have permission to write there, then you need to read about alternate
+installations in the next section.
% This rather nasty macro is used to generate the tables that describe
@@ -417,140 +398,30 @@
(This is the section to read for people doing any sort of interesting
build. Things to talk about:
\begin{itemize}
-\item the \file{Setup} file (any platform now, but \UNIX-biased)
+\item the \file{Setup} file (any platform now, but Unix-biased)
\item CFLAGS and LDFLAGS (must implement them first!)
\item using non-MS compilers on Windows (how to convert
Python's library, ...)
\end{itemize}
-%\subsection{Tweaking compiler/linker flags}
-%\label{tweak-flags}
-
-
-\subsection{Using non-Microsoft compilers on Windows \label{non-ms-compilers}}
-\sectionauthor{Rene Liebscher}{R.Liebscher@gmx.de}
-
-\subsubsection{Borland C++}
-
-This subsection describes the necessary steps to use Distutils with the
-Borland \Cpp{} compiler version 5.5.\footnote{Check
-\url{http://www.borland.com/bcppbuilder/freecompiler/} for download}
-%Should we mention that users have to create cfg-files for the compiler
-%see also http://community.borland.com/article/0,1410,21205,00.html
-
-First you have to know that the Borland's object file format(OMF) is
-different from what is used by the Python version you can download
-from the Python web site. (Python is built with Microsoft Visual \Cpp,
-which uses COFF as object file format.) For this reason you have to
-convert Python's library \file{python20.lib} into the Borland format.
-You can do this as follows:
-
-\begin{verbatim}
-coff2omf python20.lib python20_bcpp.lib
-\end{verbatim}
-
-The \file{coff2omf} program comes with the Borland compiler. The file
-\file{python20.lib} is in the \file{Libs} directory of your Python
-installation. If your extension uses other libraries (zlib,...) you
-have to convert them too.
-
-The converted files have to reside in the same directories as the
-normal libraries.
-
-How does Distutils manage to use these libraries with their changed
-names? If the extension needs a library (eg. \file{foo}) Distutils
-checks first if it finds a library with suffix \file{_bcpp}
-(eg. \file{foo_bcpp.lib}) and then uses this library. In the case it
-doesn't find such a special library it uses the default name
-(\file{foo.lib}.)\footnote{This also means you could replace all
-existing COFF-libraries with OMF-libraries of the same name.}
+\subsection{Tweaking compiler/linker flags}
+\label{tweak-flags}
-To let Distutils compile your extension with Borland \Cpp{} you now have
-to type:
-\begin{verbatim}
-python setup.py build --compiler=bcpp
-\end{verbatim}
+\subsection{Using non-Microsoft compilers on Windows}
+\label{non-ms-compilers}
-If you want to use the Borland \Cpp{} compiler as default, you should
-consider to write it in your personal or system-wide configuration
-file for Distutils (see section~\ref{config-files}.)
-
\XXX{One place to look: \url{http://www.cyberus.ca/~g_will/pyExtenDL.shtml}}
-\subsubsection{GNU C / Cygwin / MinGW32}
-
-This section describes the necessary steps to use Distutils with the
-GNU C/\Cpp{} compilers in their Cygwin and MinGW32
-distributions.\footnote{Check
-\url{http://sources.redhat.com/cygwin/} and
-\url{http://www.mingw.org} for more information}
-
-\XXX{For a Python which was built with Cygwin, all should work without
-any of these following steps.}
-
-For these compilers we have to create some special libraries too.
-This task is more complex as for Borland's \Cpp, because there is no
-program to convert the library (inclusive the references on data
-structures.)
-
-First you have to create a list of symbols which the Python DLL exports.
-(You can find a good program for this task at
-\url{http://starship.python.net/crew/kernr/mingw32/Notes.html}, see at
-PExports 0.42h there.)
-
-\begin{verbatim}
-pexports python20.dll >python20.def
-\end{verbatim}
-
-Then you can create from these information an import library for gcc.
-
-\begin{verbatim}
-dlltool --dllname python20.dll --def python20.def --output-lib libpython20.a
-\end{verbatim}
-The resulting library has to be placed in the same directory as
-\file{python20.lib}. (Should be the \file{libs} directory under your
-Python installation directory.)
-
-If your extension uses other libraries (zlib,...) you might
-have to convert them too.
-The converted files have to reside in the same directories as the normal
-libraries do.
-
-To let Distutils compile your extension with Cygwin you now have to type
-
-\begin{verbatim}
-python setup.py build --compiler=cygwin
-\end{verbatim}
-
-and for Cygwin in no-cygwin mode\footnote{Then you have no POSIX emulation
-available, but you also don't need \file{cygwin1.dll}.} or for MinGW32 type
-
-\begin{verbatim}
-python setup.py build --compiler=mingw32
-\end{verbatim}
-
-If you want to use any of these options/compilers as default, you should
-consider to write it in your personal or system-wide configuration file
-for Distutils (see section~\ref{config-files}.)
-
-\XXX{One place to look: \url{http://www.zope.org/Members/als/tips/win32_mingw_modules}}
-
-\XXX{For converted import libraries for python20, tcl83 and tk83 in
-cygwin/mingw32 and bcpp format, see
-\url{http://www.htw-dresden.de/~liebschr/PyOpenGL/py2.0-libs.tgz}
-and for the missing header files of the in python2.0 included tcl/tk,
- see \url{http://www.htw-dresden.de/\%7Eliebschr/PyOpenGL/py2.0-tk8.3-header.tgz}.}
-
\section{Alternate Installation}
\label{alt-install}
Often, it is necessary or desirable to install modules to a location
other than the standard location for third-party Python modules. For
-example, on a \UNIX{} system you might not have permission to write to the
+example, on a Unix system you might not have permission to write to the
standard third-party module directory. Or you might wish to try out a
module before making it a standard part of your local Python
installation; this is especially true when upgrading a distribution
@@ -563,30 +434,27 @@
the \command{install} command picks a set of directories (called an
\emph{installation scheme}) under this base directory in which to
install files. The details differ across platforms, so read whichever
-of the following sections applies to you.
+of the following section applies to you.
-\subsection{Alternate installation: \UNIX{} (the home scheme)}
+\subsection{Alternate installation: Unix (the home scheme)}
\label{alt-install-prefix}
-Under \UNIX, there are two ways to perform an alternate installation.
+Under Unix, there are two ways to perform an alternate installation.
The ``prefix scheme'' is similar to how alternate installation works
-under Windows and MacOS, but is not necessarily the most useful way to
+under Windows and Mac~OS, but is not necessarily the most useful way to
maintain a personal Python library. Hence, we document the more
convenient and commonly useful ``home scheme'' first.
The idea behind the ``home scheme'' is that you build and maintain a
personal stash of Python modules, probably under your home directory.
Installing a new module distribution is as simple as
-
\begin{verbatim}
python setup.py install --home=
\end{verbatim}
-
where you can supply any directory you like for the \longprogramopt{home}
option. Lazy typists can just type a tilde (\code{\textasciitilde}); the
\command{install} command will expand this to your home directory:
-
\begin{verbatim}
python setup.py install --home=~
\end{verbatim}
@@ -599,7 +467,7 @@
{home}{/bin}
{home}{/share}
-\subsection{Alternate installation: \UNIX{} (the prefix scheme)}
+\subsection{Alternate installation: Unix (the prefix scheme)}
\label{alt-install-home}
The ``prefix scheme'' is useful when you wish to use one Python
@@ -617,7 +485,6 @@
modules from source, you probably want them to go in
\file{/usr/local/lib/python1.\filevar{X}} rather than
\file{/usr/lib/python1.\filevar{X}}. This can be done with
-
\begin{verbatim}
/usr/bin/python setup.py install --prefix=/usr/local
\end{verbatim}
@@ -629,7 +496,6 @@
but those modules would have to be installed to, say,
\file{/mnt/\filevar{@server}/export/lib/python1.\filevar{X}}. This
could be done with
-
\begin{verbatim}
/usr/local/bin/python setup.py install --prefix=/mnt/@server/export
\end{verbatim}
@@ -653,7 +519,7 @@
are created at installation time.
Incidentally, the real reason the prefix scheme is important is simply
-that a standard \UNIX{} installation uses the prefix scheme, but with
+that a standard Unix installation uses the prefix scheme, but with
\longprogramopt{prefix} and \longprogramopt{exec-prefix} supplied by
Python itself (as \code{sys.prefix} and \code{sys.exec\_prefix}). Thus,
you might think you'll never use the prefix scheme, but every time you
@@ -678,14 +544,12 @@
Since Windows has no conception of a user's home directory, and since
the standard Python installation under Windows is simpler than that
-under \UNIX, there's no point in having separate \longprogramopt{prefix}
+under Unix, there's no point in having separate \longprogramopt{prefix}
and \longprogramopt{home} options. Just use the \longprogramopt{prefix}
option to specify a base directory, e.g.
-
\begin{verbatim}
python setup.py install --prefix="\Temp\Python"
\end{verbatim}
-
to install modules to the \file{\textbackslash{}Temp} directory on the current
drive.
@@ -698,10 +562,10 @@
{prefix}{\textbackslash{}Data}
-\subsection{Alternate installation: MacOS}
+\subsection{Alternate installation: Mac~OS}
\label{alt-install-macos}
-Like Windows, MacOS has no notion of home directories (or even of
+Like Windows, Mac~OS has no notion of home directories (or even of
users), and a fairly simple standard Python installation. Thus, only a
\longprogramopt{prefix} option is needed. It defines the installation
base, and files are installed under it as follows:
@@ -731,31 +595,28 @@
be relative, absolute, or explicitly defined in terms of one of the
installation base directories. (There are two installation base
directories, and they are normally the same---they only differ when you
-use the \UNIX{} ``prefix scheme'' and supply different
+use the Unix ``prefix scheme'' and supply different
\longprogramopt{prefix} and \longprogramopt{exec-prefix} options.)
For example, say you're installing a module distribution to your home
-directory under \UNIX---but you want scripts to go in
+directory under Unix---but you want scripts to go in
\file{\textasciitilde/scripts} rather than \file{\textasciitilde/bin}.
As you might expect, you can override this directory with the
\longprogramopt{install-scripts} option; in this case, it makes most
sense to supply a relative path, which will be interpreted relative to
the installation base directory (your home directory, in this case):
-
\begin{verbatim}
python setup.py install --home=~ --install-scripts=scripts
\end{verbatim}
-Another \UNIX{} example: suppose your Python installation was built and
+Another Unix example: suppose your Python installation was built and
installed with a prefix of \file{/usr/local/python}, so under a standard
installation scripts will wind up in \file{/usr/local/python/bin}. If
you want them in \file{/usr/local/bin} instead, you would supply this
absolute directory for the \longprogramopt{install-scripts} option:
-
\begin{verbatim}
python setup.py install --install-scripts=/usr/local/bin
\end{verbatim}
-
(This performs an installation using the ``prefix scheme,'' where the
prefix is whatever your Python interpreter was installed with---
\file{/usr/local/python} in this case.)
@@ -766,11 +627,9 @@
script installation directory---you just have to remember that there are
two types of modules to worry about, pure modules and non-pure modules
(i.e., modules from a non-pure distribution). For example:
-
\begin{verbatim}
python setup.py install --install-purelib=Site --install-platlib=Site
\end{verbatim}
-
The specified installation directories are relative to \filevar{prefix}.
Of course, you also have to ensure that these directories are in
Python's module search path, e.g. by putting a \file{.pth} file in
@@ -784,7 +643,6 @@
home directory, and you want a separate directory for each platform that
you use your home directory from, you might define the following
installation scheme:
-
\begin{verbatim}
python setup.py install --home=~ \
--install-purelib=python/lib \
@@ -792,10 +650,7 @@
--install-scripts=python/scripts
--install-data=python/data
\end{verbatim}
-% $ % -- bow to font-lock
-
or, equivalently,
-
\begin{verbatim}
python setup.py install --home=~/python \
--install-purelib=lib \
@@ -803,8 +658,6 @@
--install-scripts=scripts
--install-data=data
\end{verbatim}
-% $ % -- bow to font-lock
-
\code{\$PLAT} is not (necessarily) an environment variable---it will be
expanded by the Distutils as it parses your command line options (just
as it does when parsing your configuration file(s)).
@@ -813,7 +666,6 @@
install a new module distribution would be very tedious. Thus, you can
put these options into your Distutils config file (see
section~\ref{config-files}):
-
\begin{verbatim}
[install]
install-base=$HOME
@@ -822,9 +674,7 @@
install-scripts=python/scripts
install-data=python/data
\end{verbatim}
-
or, equivalently,
-
\begin{verbatim}
[install]
install-base=$HOME/python
@@ -833,14 +683,11 @@
install-scripts=scripts
install-data=data
\end{verbatim}
-
Note that these two are \emph{not} equivalent if you supply a different
installation base directory when you run the setup script. For example,
-
\begin{verbatim}
python setup.py --install-base=/tmp
\end{verbatim}
-
would install pure modules to \filevar{/tmp/python/lib} in the first
case, and to \filevar{/tmp/lib} in the second case. (For the second
case, you probably want to supply an installation base of
@@ -854,165 +701,28 @@
extra variables that may not be in your environment, such as
\code{\$PLAT}. (And of course, you can only use the configuration
variables supplied by the Distutils on systems that don't have
-environment variables, such as MacOS (\XXX{true?}).) See
+environment variables, such as Mac~OS (\XXX{true?}).) See
section~\ref{config-files} for details.
-\XXX{need some Windows and MacOS examples---when would custom
+\XXX{need some Windows and Mac~OS examples---when would custom
installation schemes be needed on those platforms?}
\section{Distutils Configuration Files}
\label{config-files}
-As mentioned above, you can use Distutils configuration files to record
-personal or site preferences for any Distutils options. That is, any
-option to any command can be stored in one of two or three (depending on
-your platform) configuration files, which will be consulted before the
-command-line is parsed. This means that configuration files will
-override default values, and the command-line will in turn override
-configuration files. Furthermore, if multiple configuration files
-apply, values from ``earlier'' files are overridden by ``later'' files.
-
-
-\subsection{Location and names of config files}
-\label{config-filenames}
-
-The names and locations of the configuration files vary slightly across
-platforms. On \UNIX, the three configuration files (in the order they
-are processed) are:
-\begin{tableiii}{l|l|c}{textrm}
- {Type of file}{Location and filename}{Notes}
- \lineiii{system}{\filenq{\filevar{prefix}/lib/python\filevar{ver}/distutils/pydistutils.cfg}}{(1)}
- \lineiii{personal}{\filenq{\$HOME/.pydistutils.cfg}}{(2)}
- \lineiii{local}{\filenq{setup.cfg}}{(3)}
-\end{tableiii}
-
-On Windows, the configuration files are:
-\begin{tableiii}{l|l|c}{textrm}
- {Type of file}{Location and filename}{Notes}
- \lineiii{system}{\filenq{\filevar{prefix}\textbackslash{}Lib\textbackslash{}distutils\textbackslash{}pydistutils.cfg}}{(4)}
- \lineiii{personal}{\filenq{\%HOME\textbackslash{}pydistutils.cfg}}{(5)}
- \lineiii{local}{\filenq{setup.cfg}}{(3)}
-\end{tableiii}
-
-And on MacOS, they are:
-\begin{tableiii}{l|l|c}{textrm}
- {Type of file}{Location and filename}{Notes}
- \lineiii{system}{\filenq{\filevar{prefix}:Lib:distutils:pydistutils.cfg}}{(6)}
- \lineiii{personal}{N/A}{}
- \lineiii{local}{\filenq{setup.cfg}}{(3)}
-\end{tableiii}
-
-\noindent Notes:
-\begin{description}
-\item[(1)] Strictly speaking, the system-wide configuration file lives
- in the directory where the Distutils are installed; under Python 1.6
- and later on \UNIX, this is as shown. For Python 1.5.2, the Distutils
- will normally be installed to
- \file{\filevar{prefix}/lib/site-packages/python1.5/distutils},
- so the system configuration file should be put there under Python
- 1.5.2.
-\item[(2)] On \UNIX, if the \envvar{HOME} environment variable is not
- defined, the user's home directory will be determined with the
- \function{getpwuid()} function from the standard \module{pwd} module.
-\item[(3)] I.e., in the current directory (usually the location of the
- setup script).
-\item[(4)] (See also note (1).) Under Python 1.6 and later, Python's
- default ``installation prefix'' is \file{C:\textbackslash{}Python}, so
- the system configuration file is normally
- \file{C:\textbackslash{}Python\textbackslash{}Lib\textbackslash{}distutils\textbackslash{}pydistutils.cfg}.
- Under Python 1.5.2, the default prefix was
- \file{C:\textbackslash{}Program~Files\textbackslash{}Python}, and the
- Distutils were not part of the standard library---so the system
- configuration file would be
- \file{C:\textbackslash{}Program~Files\textbackslash{}Python\textbackslash{}distutils\textbackslash{}pydistutils.cfg}
- in a standard Python 1.5.2 installation under Windows.
-\item[(5)] On Windows, if the \envvar{HOME} environment variable is not
- defined, no personal configuration file will be found or used. (In
- other words, the Distutils make no attempt to guess your home
- directory on Windows.)
-\item[(6)] (See also notes (1) and (4).) The default installation
- prefix is just \file{Python:}, so under Python 1.6 and later this is
- normally\file{Python:Lib:distutils:pydistutils.cfg}. (The Distutils
- don't work very well with Python 1.5.2 under MacOS. \XXX{true?})
-\end{description}
-
-
-\subsection{Syntax of config files}
-\label{config-syntax}
-
-The Distutils configuration files all have the same syntax. The config
-files are grouped into sections; there is one section for each Distutils
-command, plus a \code{global} section for global options that affect
-every command. Each section consists of one option per line, specified
-like \code{option=value}.
-
-For example, the following is a complete config file that just forces
-all commands to run quietly by default:
-
-\begin{verbatim}
-[global]
-verbose=0
-\end{verbatim}
-
-If this is installed as the system config file, it will affect all
-processing of any Python module distribution by any user on the current
-system. If it is installed as your personal config file (on systems
-that support them), it will affect only module distributions processed
-by you. And if it is used as the \file{setup.cfg} for a particular
-module distribution, it affects only that distribution.
-
-You could override the default ``build base'' directory and make the
-\command{build*} commands always forcibly rebuild all files with the
-following:
-
-\begin{verbatim}
-[build]
-build-base=blib
-force=1
-\end{verbatim}
-
-which corresponds to the command-line arguments
-
-\begin{verbatim}
-python setup.py build --build-base=blib --force
-\end{verbatim}
-
-except that including the \command{build} command on the command-line
-means that command will be run. Including a particular command in
-config files has no such implication; it only means that if the command
-is run, the options in the config file will apply. (Or if other
-commands that derive values from it are run, they will use the values in
-the config file.)
-
-You can find out the complete list of options for any command using the
-\longprogramopt{help} option, e.g.:
-
-\begin{verbatim}
-python setup.py build --help
-\end{verbatim}
-
-and you can find out the complete list of global options by using
-\longprogramopt{help} without a command:
-
-\begin{verbatim}
-python setup.py --help
-\end{verbatim}
-
-See also the ``Reference'' section of the ``Distributing Python
-Modules'' manual.
+\section{Pre-Distutils Conventions}
+\label{pre-distutils}
-%\section{Pre-Distutils Conventions}
-%\label{pre-distutils}
+\subsection{The Makefile.pre.in file}
+\label{makefile-pre-in}
-%\subsection{The Makefile.pre.in file}
-%\label{makefile-pre-in}
+\subsection{Installing modules manually}
+\label{manual-install}
-%\subsection{Installing modules manually}
-%\label{manual-install}
\end{document}
Only in main/Apps/ActivePython-2.0/src/Core/Doc/lib: .cvsignore
Only in main/Apps/ActivePython-2.0/src/Core/Doc/lib: CVS
Only in main/contrib/python-2.0/dist/src/Doc/lib: libcursespanel.tex
Only in main/contrib/python-2.0/dist/src/Doc/lib: libdifflib.tex
Only in main/contrib/python-2.0/dist/src/Doc/lib: libdoctest.tex
Only in main/contrib/python-2.0/dist/src/Doc/lib: libfpectl.tex
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libftplib.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libftplib.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libftplib.tex Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libftplib.tex Mon Mar 12 16:10:18 2001
@@ -169,17 +169,15 @@
\begin{methoddesc}{set_pasv}{boolean}
Enable ``passive'' mode if \var{boolean} is true, other disable
-passive mode. (In Python 2.0 and before, passive mode was off by
-default; in Python 2.1 and later, it is on by default.)
+passive mode.
\end{methoddesc}
-\begin{methoddesc}{storbinary}{command, file\optional{, blocksize}}
+\begin{methoddesc}{storbinary}{command, file, blocksize}
Store a file in binary transfer mode. \var{command} should be an
appropriate \samp{STOR} command, i.e.\ \code{"STOR \var{filename}"}.
\var{file} is an open file object which is read until \EOF{} using its
\method{read()} method in blocks of size \var{blocksize} to provide the
-data to be stored. The \var{blocksize} argument defaults to 8192.
-\versionchanged[default for \var{blocksize} added]{2.1}
+data to be stored.
\end{methoddesc}
\begin{methoddesc}{storlines}{command, file}
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libfuncs.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libfuncs.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libfuncs.tex Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libfuncs.tex Mon Mar 12 16:10:18 2001
@@ -19,11 +19,12 @@
operations out of which you can build your own
\function{__import__()} function.
-For example, the statement \samp{import spam} results in the
+For example, the statement `\code{import} \code{spam}' results in the
following call:
\code{__import__('spam',} \code{globals(),} \code{locals(), [])};
-the statement \samp{from spam.ham import eggs} results
-in \samp{__import__('spam.ham', globals(), locals(), ['eggs'])}.
+the statement \code{from} \code{spam.ham import} \code{eggs} results
+in \code{__import__('spam.ham',} \code{globals(),} \code{locals(),}
+\code{['eggs'])}.
Note that even though \code{locals()} and \code{['eggs']} are passed
in as arguments, the \function{__import__()} function does not set the
local variable named \code{eggs}; this is done by subsequent code that
@@ -330,10 +331,8 @@
representable as a Python integer, possibly embedded in whitespace;
this behaves identical to \code{string.atoi(\var{x}\optional{,
\var{radix}})}. The \var{radix} parameter gives the base for the
- conversion and may be any integer in the range [2, 36], or zero. If
- \var{radix} is zero, the proper radix is guessed based on the
- contents of string; the interpretation is the same as for integer
- literals. If \var{radix} is specified and \var{x} is not a string,
+ conversion and may be any integer in the range [2, 36]. If
+ \var{radix} is specified and \var{x} is not a string,
\exception{TypeError} is raised.
Otherwise, the argument may be a plain or
long integer or a floating point number. Conversion of floating
@@ -393,13 +392,11 @@
the interpreter.
\end{funcdesc}
-\begin{funcdesc}{long}{x\optional{, radix}}
+\begin{funcdesc}{long}{x}
Convert a string or number to a long integer. If the argument is a
- string, it must contain a possibly signed number of
+ string, it must contain a possibly signed decimal number of
arbitrary size, possibly embedded in whitespace;
- this behaves identical to \code{string.atol(\var{x})}. The
- \var{radix} argument is interpreted in the same way as for
- \function{int()}, and may only be given when \var{x} is a string.
+ this behaves identical to \code{string.atol(\var{x})}.
Otherwise, the argument may be a plain or
long integer or a floating point number, and a long integer with
the same value is returned. Conversion of floating
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libgdbm.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libgdbm.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libgdbm.tex Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libgdbm.tex Mon Mar 12 16:10:18 2001
@@ -35,21 +35,12 @@
\code{'c'} (which creates the database if it doesn't exist), or
\code{'n'} (which always creates a new empty database).
-The following additional characters may be appended to the flag to
-control how the database is opened:
-
-\begin{itemize}
-\item \code{'f'} --- Open the database in fast mode. Writes to the database
- will not be syncronized.
-\item \code{'s'} --- Synchronized mode. This will cause changes to the database
- will be immediately written to the file.
-\item \code{'u'} --- Do not lock database.
-\end{itemize}
-
-Not all flags are valid for all versions of \code{gdbm}. The
-module constant \code{open_flags} is a string of supported flag
-characters. The exception \exception{error} is raised if an invalid
-flag is specified.
+Appending \character{f} to the flag opens the database in fast mode;
+altered data will not automatically be written to the disk after every
+change. This results in faster writes to the database, but may result
+in an inconsistent database if the program crashes while the database
+is still open. Use the \method{sync()} method to force any unwritten
+data to be written to the disk.
The optional \var{mode} argument is the \UNIX{} mode of the file, used
only when the database has to be created. It defaults to octal
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libmailbox.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libmailbox.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libmailbox.tex Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libmailbox.tex Mon Mar 12 16:10:18 2001
@@ -8,71 +8,33 @@
This module defines a number of classes that allow easy and uniform
access to mail messages in a (\UNIX{}) mailbox.
-\begin{classdesc}{UnixMailbox}{fp\optional{, factory}}
-Access to a classic \UNIX-style mailbox, where all messages are
-contained in a single file and separated by \samp{From }
-(a.k.a.\ \samp{From_}) lines. The file object \var{fp} points to the
-mailbox file. The optional \var{factory} parameter is a callable that
-should create new message objects. \var{factory} is called with one
-argument, \var{fp} by the \method{next()} method of the mailbox
-object. The default is the \class{rfc822.Message} class (see the
-\refmodule{rfc822} module).
-
-For maximum portability, messages in a \UNIX-style mailbox are
-separated by any line that begins exactly with the string \code{'From
-'} (note the trailing space) if preceded by exactly two newlines.
-Because of the wide-range of variations in practice, nothing else on
-the From_ line should be considered. However, the current
-implementation doesn't check for the leading two newlines. This is
-usually fine for most applications.
-
-The \class{UnixMailbox} class implements a more strict version of
-From_ line checking, using a regular expression that usually correctly
-matched From_ delimiters. It considers delimiter line to be separated
-by \samp{From \var{name} \var{time}} lines. For maximum portability,
-use the \class{PortableUnixMailbox} class instead. This class is
-identical to \class{UnixMailbox} except that individual messages are
-separated by only \samp{From } lines.
-
-For more information, see
-\citetitle[http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/content-length.html]{Configuring
-Netscape Mail on \UNIX: Why the Content-Length Format is Bad}.
+\begin{classdesc}{UnixMailbox}{fp}
+Access a classic \UNIX{}-style mailbox, where all messages are contained
+in a single file and separated by ``From name time'' lines.
+The file object \var{fp} points to the mailbox file.
\end{classdesc}
-\begin{classdesc}{PortableUnixMailbox}{fp\optional{, factory}}
-A less-strict version of \class{UnixMailbox}, which considers only the
-\samp{From } at the beginning of the line separating messages. The
-``\var{name} \var{time}'' portion of the From line is ignored, to
-protect against some variations that are observed in practice. This
-works since lines in the message which begin with \code{'From '} are
-quoted by mail handling software well before delivery.
-\end{classdesc}
-
-\begin{classdesc}{MmdfMailbox}{fp\optional{, factory}}
+\begin{classdesc}{MmdfMailbox}{fp}
Access an MMDF-style mailbox, where all messages are contained
in a single file and separated by lines consisting of 4 control-A
characters. The file object \var{fp} points to the mailbox file.
-Optional \var{factory} is as with the \class{UnixMailbox} class.
\end{classdesc}
-\begin{classdesc}{MHMailbox}{dirname\optional{, factory}}
+\begin{classdesc}{MHMailbox}{dirname}
Access an MH mailbox, a directory with each message in a separate
file with a numeric name.
The name of the mailbox directory is passed in \var{dirname}.
-\var{factory} is as with the \class{UnixMailbox} class.
\end{classdesc}
-\begin{classdesc}{Maildir}{dirname\optional{, factory}}
+\begin{classdesc}{Maildir}{dirname}
Access a Qmail mail directory. All new and current mail for the
mailbox specified by \var{dirname} is made available.
-\var{factory} is as with the \class{UnixMailbox} class.
\end{classdesc}
-\begin{classdesc}{BabylMailbox}{fp\optional{, factory}}
+\begin{classdesc}{BabylMailbox}{fp}
Access a Babyl mailbox, which is similar to an MMDF mailbox. Mail
messages start with a line containing only \code{'*** EOOH ***'} and
end with a line containing only \code{'\e{}037\e{}014'}.
-\var{factory} is as with the \class{UnixMailbox} class.
\end{classdesc}
@@ -82,9 +44,7 @@
method:
\begin{methoddesc}[mailbox]{next}{}
-Return the next message in the mailbox, created with the optional
-\var{factory} argument passed into the mailbox object's constructor.
-By defaul this is an \class{rfc822.Message}
+Return the next message in the mailbox, as a \class{rfc822.Message}
object (see the \refmodule{rfc822} module). Depending on the mailbox
implementation the \var{fp} attribute of this object may be a true
file object or a class instance simulating a file object, taking care
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libnew.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libnew.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libnew.tex Mon Mar 12 16:11:28 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libnew.tex Mon Mar 12 16:10:18 2001
@@ -2,7 +2,7 @@
Creation of runtime internal objects}
\declaremodule{builtin}{new}
-\sectionauthor{Moshe Zadka}{moshez@zadka.site.co.il}
+\sectionauthor{Moshe Zadka}{mzadka@geocities.com}
\modulesynopsis{Interface to the creation of runtime implementation objects.}
@@ -14,12 +14,10 @@
The \module{new} module defines the following functions:
-\begin{funcdesc}{instance}{class\optional{, dict}}
+\begin{funcdesc}{instance}{class, dict}
This function creates an instance of \var{class} with dictionary
-\var{dict} without calling the \method{__init__()} constructor. If
-\var{dict} is omitted or \code{None}, a new, empty dictionary is
-created for the new instance. Note that there are no guarantees that
-the object will be in a consistent state.
+\var{dict} without calling the \method{__init__()} constructor. Note that
+there are no guarantees that the object will be in a consistent state.
\end{funcdesc}
\begin{funcdesc}{instancemethod}{function, instance, class}
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libshlex.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libshlex.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libshlex.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libshlex.tex Mon Mar 12 16:10:19 2001
@@ -66,41 +66,20 @@
result is a relative pathname, the directory part of the name of the
file immediately before it on the source inclusion stack is prepended
(this behavior is like the way the C preprocessor handles
-\code{\#include "file.h"}).
-
-The result of the manipulations is treated as a filename, and returned
-as the first component of the tuple, with
-\function{open()} called on it to yield the second component. (Note:
-this is the reverse of the order of arguments in instance initialization!)
+\code{\#include "file.h"}). The result of the manipulations is treated
+as a filename, and returned as the first component of the tuple, with
+\function{open()} called on it to yield the second component.
This hook is exposed so that you can use it to implement directory
search paths, addition of file extensions, and other namespace hacks.
There is no corresponding `close' hook, but a shlex instance will call
the \method{close()} method of the sourced input stream when it
returns \EOF.
-
-For more explicit control of source stacking, use the
-\method{push_source()} and \method{pop_source()} methods.
-\end{methoddesc}
-
-\begin{methoddesc}{push_source}{stream\optional{, filename}}
-Push an input source stream onto the input stack. If the filename
-argument is specified it will later be available for use in error
-messages. This is the same method used internally by the
-\method{sourcehook} method.
-\versionadded{2.1}
-\end{methoddesc}
-
-\begin{methoddesc}{pop_source}{}
-Pop the last-pushed input source from the input stack.
-This is the same method used internally when the lexer reaches
-\EOF on a stacked input stream.
-\versionadded{2.1}
\end{methoddesc}
\begin{methoddesc}{error_leader}{\optional{file\optional{, line}}}
This method generates an error message leader in the format of a
-\UNIX{} C compiler error label; the format is \code{'"\%s", line \%d: '},
+\UNIX{} C compiler error label; the format is '"\%s", line \%d: ',
where the \samp{\%s} is replaced with the name of the current source
file and the \samp{\%d} with the current input line number (the
optional arguments can be used to override these).
Only in main/Apps/ActivePython-2.0/src/Core/Doc/lib: libsoundex.tex
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libstdtypes.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libstdtypes.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libstdtypes.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libstdtypes.tex Mon Mar 12 16:10:19 2001
@@ -62,13 +62,10 @@
\indexii{Boolean}{operations}
\begin{tableiii}{c|l|c}{code}{Operation}{Result}{Notes}
- \lineiii{\var{x} or \var{y}}
- {if \var{x} is false, then \var{y}, else \var{x}}{(1)}
- \lineiii{\var{x} and \var{y}}
- {if \var{x} is false, then \var{x}, else \var{y}}{(1)}
+ \lineiii{\var{x} or \var{y}}{if \var{x} is false, then \var{y}, else \var{x}}{(1)}
+ \lineiii{\var{x} and \var{y}}{if \var{x} is false, then \var{x}, else \var{y}}{(1)}
\hline
- \lineiii{not \var{x}}
- {if \var{x} is false, then \code{1}, else \code{0}}{(2)}
+ \lineiii{not \var{x}}{if \var{x} is false, then \code{1}, else \code{0}}{(2)}
\end{tableiii}
\opindex{and}
\opindex{or}
@@ -428,7 +425,6 @@
\code{'strict'}, meaning that encoding errors raise a
\exception{ValueError}. Other possible values are \code{'ignore'} and
\code{'replace'}.
-\versionadded{2.0}
\end{methoddesc}
\begin{methoddesc}[string]{endswith}{suffix\optional{, start\optional{, end}}}
@@ -594,51 +590,43 @@
\index{printf-style formatting}
\index{sprintf-style formatting}
-String and Unicode objects have one unique built-in operation: the
-\code{\%} operator (modulo). Given \code{\var{format} \%
-\var{values}} (where \var{format} is a string or Unicode object),
-\code{\%} conversion specifications in \var{format} are replaced with
-zero or more elements of \var{values}. The effect is similar to the
-using \cfunction{sprintf()} in the C language. If \var{format} is a
-Unicode object, or if any of the objects being converted using the
-\code{\%s} conversion are Unicode objects, the result will be a
-Unicode object as well.
-
-If \var{format} requires a single argument, \var{values} may be a
-single non-tuple object. \footnote{A tuple object in this case should
- be a singleton.} Otherwise, \var{values} must be a tuple with
-exactly the number of items specified by the format string, or a
-single mapping object (for example, a dictionary).
-
-A conversion specifier contains two or more characters and has the
-following components, which must occur in this order:
-
-\begin{enumerate}
- \item The \character{\%} character, which marks the start of the
- specifier.
- \item Mapping key value (optional), consisting of an identifier in
- parentheses (for example, \code{(somename)}).
- \item Conversion flags (optional), which affect the result of some
- conversion types.
- \item Minimum field width (optional). If specified as an
- \character{*} (asterisk), the actual width is read from the
- next element of the tuple in \var{values}, and the object to
- convert comes after the minimum field width and optional
- precision.
- \item Precision (optional), given as a \character{.} (dot) followed
- by the precision. If specified as \character{*} (an
- asterisk), the actual width is read from the next element of
- the tuple in \var{values}, and the value to convert comes after
- the precision.
- \item Length modifier (optional).
- \item Conversion type.
-\end{enumerate}
+String objects have one unique built-in operation: the \code{\%}
+operator (modulo) with a string left argument interprets this string
+as a C \cfunction{sprintf()} format string to be applied to the
+right argument, and returns the string resulting from this formatting
+operation.
+
+The right argument should be a tuple with one item for each argument
+required by the format string; if the string requires a single
+argument, the right argument may also be a single non-tuple
+object.\footnote{A tuple object in this case should be a singleton.
+} The following format characters are understood:
+\code{\%}, \code{c}, \code{s}, \code{i}, \code{d}, \code{u}, \code{o},
+\code{x}, \code{X}, \code{e}, \code{E}, \code{f}, \code{g}, \code{G}.
+Width and precision may be a \code{*} to specify that an integer argument
+specifies the actual width or precision. The flag characters
+\code{-}, \code{+}, blank, \code{\#} and \code{0} are understood. The
+size specifiers \code{h}, \code{l} or \code{L} may be present but are
+ignored. The \code{\%s} conversion takes any Python object and
+converts it to a string using \code{str()} before formatting it. The
+ANSI features \code{\%p} and \code{\%n} are not supported. Since
+Python strings have an explicit length, \code{\%s} conversions don't
+assume that \code{'\e0'} is the end of the string.
+
+For safety reasons, floating point precisions are clipped to 50;
+\code{\%f} conversions for numbers whose absolute value is over 1e25
+are replaced by \code{\%g} conversions.\footnote{
+ These numbers are fairly arbitrary. They are intended to
+ avoid printing endless strings of meaningless digits without hampering
+ correct use and without having to know the exact precision of floating
+ point values on a particular machine.
+} All other errors raise exceptions.
If the right argument is a dictionary (or any kind of mapping), then
-the formats in the string \emph{must} have a parenthesized key into
-that dictionary inserted immediately after the \character{\%}
-character, and each format formats the corresponding entry from the
-mapping. For example:
+the formats in the string must have a parenthesized key into that
+dictionary inserted immediately after the \character{\%} character,
+and each format formats the corresponding entry from the mapping.
+For example:
\begin{verbatim}
>>> count = 2
@@ -650,66 +638,6 @@
In this case no \code{*} specifiers may occur in a format (since they
require a sequential parameter list).
-The conversion flag characters are:
-
-\begin{tableii}{c|l}{character}{Flag}{Meaning}
- \lineii{\#}{The value conversion will use the ``alternate form''
- (where defined below).}
- \lineii{0}{The conversion will be zero padded.}
- \lineii{-}{The converted value is left adjusted (overrides
- \character{-}).}
- \lineii{{~}}{(a space) A blank should be left before a positive number
- (or empty string) produced by a signed conversion.}
- \lineii{+}{A sign character (\character{+} or \character{-}) will
- precede the conversion (overrides a "space" flag).}
-\end{tableii}
-
-The length modifier may be \code{h}, \code{l}, and \code{L} may be
-present, but are ignored as they are not necessary for Python.
-
-The conversion types are:
-
-\begin{tableii}{c|l}{character}{Conversion}{Meaning}
- \lineii{d}{Signed integer decimal.}
- \lineii{i}{Signed integer decimal.}
- \lineii{o}{Unsigned octal.}
- \lineii{u}{Unsigned decimal.}
- \lineii{x}{Unsigned hexidecimal (lowercase).}
- \lineii{X}{Unsigned hexidecimal (uppercase).}
- \lineii{e}{Floating point exponential format (lowercase).}
- \lineii{E}{Floating point exponential format (uppercase).}
- \lineii{f}{Floating point decimal format.}
- \lineii{F}{Floating point decimal format.}
- \lineii{g}{Same as \character{e} if exponent is greater than -4 or
- less than precision, \character{f} otherwise.}
- \lineii{G}{Same as \character{E} if exponent is greater than -4 or
- less than precision, \character{F} otherwise.}
- \lineii{c}{Single character (accepts integer or single character
- string).}
- \lineii{r}{String (converts any python object using
- \function{repr()}).}
- \lineii{s}{String (converts any python object using
- \function{str()}).}
- \lineii{\%}{No argument is converted, results in a \character{\%}
- character in the result. (The complete specification is
- \code{\%\%}.)}
-\end{tableii}
-
-% XXX Examples?
-
-
-Since Python strings have an explicit length, \code{\%s} conversions
-do not assume that \code{'\e0'} is the end of the string.
-
-For safety reasons, floating point precisions are clipped to 50;
-\code{\%f} conversions for numbers whose absolute value is over 1e25
-are replaced by \code{\%g} conversions.\footnote{
- These numbers are fairly arbitrary. They are intended to
- avoid printing endless strings of meaningless digits without hampering
- correct use and without having to know the exact precision of floating
- point values on a particular machine.
-} All other errors raise exceptions.
-
Additional string operations are defined in standard module
\refmodule{string} and in built-in module \refmodule{re}.
\refstmodindex{string}
@@ -886,9 +814,6 @@
{\code{\var{a}[\var{k}]} if \code{\var{a}.has_key(\var{k})},
else \var{x} (also setting it)}
{(5)}
- \lineiii{\var{a}.popitem()}
- {remove and return an arbitrary (\var{key}, \var{value}) pair}
- {(6)}
\end{tableiii}
\noindent
@@ -913,9 +838,6 @@
\item[(5)] \function{setdefault()} is like \function{get()}, except
that if \var{k} is missing, \var{x} is both returned and inserted into
the dictionary as the value of \var{k}.
-
-\item[(6)] \function{popitem()} is useful to destructively iterate
-over a dictionary, as often used in set algorithms.
\end{description}
@@ -975,23 +897,6 @@
same as \code{\var{m}.__dict__} where \var{m} is the module in which
the function \var{f} was defined).
-Function objects also support getting and setting arbitrary
-attributes, which can be used to, e.g. attach metadata to functions.
-Regular attribute dot-notation is used to get and set such
-attributes. \emph{Note that the current implementation only supports
-function attributes on functions written in Python. Function
-attributes on built-ins may be supported in the future.}
-
-Functions have another special attribute \code{\var{f}.__dict__}
-(a.k.a. \code{\var{f}.func_dict}) which contains the namespace used to
-support function attributes. \code{__dict__} can be accessed
-directly, set to a dictionary object, or \code{None}. It can also be
-deleted (but the following two lines are equivalent):
-
-\begin{verbatim}
-del func.__dict__
-func.__dict__ = None
-\end{verbatim}
\subsubsection{Methods \label{typesmethods}}
\obindex{method}
@@ -1009,31 +914,6 @@
calling \code{\var{m}.im_func(\var{m}.im_self, \var{arg-1},
\var{arg-2}, \textrm{\ldots}, \var{arg-n})}.
-Class instance methods are either \emph{bound} or \emph{unbound},
-referring to whether the method was accessed through an instance or a
-class, respectively. When a method is unbound, its \code{im_self}
-attribute will be \code{None} and if called, an explicit \code{self}
-object must be passed as the first argument. In this case,
-\code{self} must be an instance of the unbound method's class (or a
-subclass of that class), otherwise a \code{TypeError} is raised.
-
-Like function objects, methods objects support getting
-arbitrary attributes. However, since method attributes are actually
-stored on the underlying function object (i.e. \code{meth.im_func}),
-setting method attributes on either bound or unbound methods is
-disallowed. Attempting to set a method attribute results in a
-\code{TypeError} being raised. In order to set a method attribute,
-you need to explicitly set it on the underlying function object:
-
-\begin{verbatim}
-class C:
- def method(self):
- pass
-
-c = C()
-c.method.im_func.whoami = 'my name is c'
-\end{verbatim}
-
See the \citetitle[../ref/ref.html]{Python Reference Manual} for more
information.
@@ -1091,7 +971,6 @@
It is written as \code{Ellipsis}.
-
\subsubsection{File Objects\obindex{file}
\label{bltin-file-objects}}
@@ -1115,8 +994,8 @@
\begin{methoddesc}[file]{close}{}
Close the file. A closed file cannot be read or written anymore.
- Any operation which requires that the file be open will raise a
- \exception{ValueError} after the file has been closed. Calling
+ Any operation which requires that the file be open will raise an
+ \exception{IOError} after the file has been closed. Calling
\method{close()} more than once is allowed.
\end{methoddesc}
@@ -1185,21 +1064,12 @@
implemented, or cannot be implemented efficiently.
\end{methoddesc}
-\begin{methoddesc}[file]{xreadlines}{}
- Equivalent to \function{xreadlines.xreadlines(file)}.\refstmodindex{xreadlines}
-\end{methoddesc}
-
\begin{methoddesc}[file]{seek}{offset\optional{, whence}}
Set the file's current position, like \code{stdio}'s \cfunction{fseek()}.
The \var{whence} argument is optional and defaults to \code{0}
(absolute file positioning); other values are \code{1} (seek
relative to the current position) and \code{2} (seek relative to the
- file's end). There is no return value. Note that if the file is
- opened for appending (mode \code{'a'} or \code{'a+'}), any
- \method{seek()} operations will be undone at the next write. If the
- file is only opened for writing in append mode (mode \code{'a'}),
- this method is essentially a no-op, but it remains useful for files
- opened in append mode with reading enabled (mode \code{'a+'}).
+ file's end). There is no return value.
\end{methoddesc}
\begin{methoddesc}[file]{tell}{}
@@ -1216,21 +1086,15 @@
\end{methoddesc}
\begin{methoddesc}[file]{write}{str}
- Write a string to the file. There is no return value. Note: Due to
- buffering, the string may not actually show up in the file until
- the \method{flush()} or \method{close()} method is called.
+Write a string to the file. There is no return value. Note: Due to
+buffering, the string may not actually show up in the file until
+the \method{flush()} or \method{close()} method is called.
\end{methoddesc}
\begin{methoddesc}[file]{writelines}{list}
- Write a list of strings to the file. There is no return value.
- (The name is intended to match \method{readlines()};
- \method{writelines()} does not add line separators.)
-\end{methoddesc}
-
-\begin{methoddesc}[file]{xreadlines}{}
- Equivalent to
- \function{xreadlines.xreadlines(\var{file})}.\refstmodindex{xreadlines}
- (See the \refmodule{xreadlines} module for more information.)
+Write a list of strings to the file. There is no return value.
+(The name is intended to match \method{readlines()};
+\method{writelines()} does not add line separators.)
\end{methoddesc}
@@ -1272,7 +1136,6 @@
\keyword{print} to keep track of its internal state.
\end{memberdesc}
-
\subsubsection{Internal Objects \label{typesinternal}}
See the \citetitle[../ref/ref.html]{Python Reference Manual} for this
@@ -1285,28 +1148,26 @@
The implementation adds a few special read-only attributes to several
object types, where they are relevant:
-\begin{memberdesc}[object]{__dict__}
-A dictionary or other mapping object used to store an
+\begin{memberdescni}{__dict__}
+A dictionary of some sort used to store an
object's (writable) attributes.
-\end{memberdesc}
+\end{memberdescni}
-\begin{memberdesc}[object]{__methods__}
+\begin{memberdescni}{__methods__}
List of the methods of many built-in object types,
e.g., \code{[].__methods__} yields
\code{['append', 'count', 'index', 'insert', 'pop', 'remove',
-'reverse', 'sort']}. This usually does not need to be explicitly
-provided by the object.
-\end{memberdesc}
+'reverse', 'sort']}.
+\end{memberdescni}
-\begin{memberdesc}[object]{__members__}
-Similar to \member{__methods__}, but lists data attributes. This
-usually does not need to be explicitly provided by the object.
-\end{memberdesc}
+\begin{memberdescni}{__members__}
+Similar to \member{__methods__}, but lists data attributes.
+\end{memberdescni}
-\begin{memberdesc}[instance]{__class__}
+\begin{memberdescni}{__class__}
The class to which a class instance belongs.
-\end{memberdesc}
+\end{memberdescni}
-\begin{memberdesc}[class]{__bases__}
+\begin{memberdescni}{__bases__}
The tuple of base classes of a class object.
-\end{memberdesc}
+\end{memberdescni}
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libsys.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libsys.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libsys.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libsys.tex Mon Mar 12 16:10:19 2001
@@ -44,15 +44,6 @@
Availability: Windows.
\end{datadesc}
-\begin{funcdesc}{displayhook}{\var{value}}
-If \var{value} is not \code{None}, this function prints it to
-\code{sys.stdout}, and saves it in \code{__builtin__._}.
-
-This function is called when an expression is entered at the prompt
-of an interactive Python session. It exists mainly so it can be
-overridden.
-\end{funcdesc}
-
\begin{funcdesc}{exc_info}{}
This function returns a tuple of three values that give information
about the exception that is currently being handled. The information
@@ -151,12 +142,6 @@
fatal internal error is detected, or when \code{os._exit()} is called.
\end{datadesc}
-\begin{funcdesc}{getdefaultencoding}{}
- Return the name of the current default string encoding used by the
- Unicode implementation.
- \versionadded{2.0}
-\end{funcdesc}
-
\begin{funcdesc}{getrefcount}{object}
Return the reference count of the \var{object}. The count returned is
generally one higher than you might expect, because it includes the
@@ -170,17 +155,6 @@
be set by \function{setrecursionlimit()}.
\end{funcdesc}
-\begin{funcdesc}{_getframe}{\optional{depth}}
-Return a frame object from the call stack. If optional integer
-\var{depth} is given, return the frame object that many calls below
-the top of the stack. If that is deeper than the call stack,
-\exception{ValueError} is raised. The default for \var{depth} is
-zero, returning the frame at the top of the call stack.
-
-This function should be used for internal and specialized
-purposes only.
-\end{funcdesc}
-
\begin{datadesc}{hexversion}
The version number encoded as a single integer. This is guaranteed to
increase with each version, including proper support for
@@ -280,7 +254,7 @@
Strings specifying the primary and secondary prompt of the
interpreter. These are only defined if the interpreter is in
interactive mode. Their initial values in this case are
- \code{'>\code{>}> '} and \code{'... '}. If a non-string object is assigned
+ \code{'>>> '} and \code{'... '}. If a non-string object is assigned
to either variable, its \function{str()} is re-evaluated each time
the interpreter prepares to read a new interactive command; this can
be used to implement a dynamic prompt.
@@ -294,20 +268,6 @@
it to a larger value may increase performance for programs using
threads. Setting it to a value \code{<=} 0 checks every virtual instruction,
maximizing responsiveness as well as overhead.
-\end{funcdesc}
-
-\begin{funcdesc}{setdefaultencoding}{name}
- Set the current default string encoding used by the Unicode
- implementation. If \var{name} does not match any available
- encoding, \exception{LookupError} is raised. This function is only
- intended to be used by the \refmodule{site} module implementation
- and, where needed, by \module{sitecustomize}. Once used by the
- \refmodule{site} module, it is removed from the \module{sys}
- module's namespace.
-% Note that \refmodule{site} is not imported if
-% the \programopt{-S} option is passed to the interpreter, in which
-% case this function will remain available.
- \versionadded{2.0}
\end{funcdesc}
\begin{funcdesc}{setprofile}{profilefunc}
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libtime.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libtime.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libtime.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libtime.tex Mon Mar 12 16:10:19 2001
@@ -116,12 +116,11 @@
\code{daylight} is nonzero.
\end{datadesc}
-\begin{funcdesc}{asctime}{\optional{tuple}}
+\begin{funcdesc}{asctime}{tuple}
Convert a tuple representing a time as returned by \function{gmtime()}
or \function{localtime()} to a 24-character string of the following form:
-\code{'Sun Jun 20 23:21:05 1993'}. If \var{tuple} is not provided, the
-current time as returned by \function{localtime()} is used. Note: unlike
-the C function of the same name, there is no trailing newline.
+\code{'Sun Jun 20 23:21:05 1993'}. Note: unlike the C function of
+the same name, there is no trailing newline.
\end{funcdesc}
\begin{funcdesc}{clock}{}
@@ -132,26 +131,23 @@
benchmarking\index{benchmarking} Python or timing algorithms.
\end{funcdesc}
-\begin{funcdesc}{ctime}{\optional{secs}}
+\begin{funcdesc}{ctime}{secs}
Convert a time expressed in seconds since the epoch to a string
-representing local time. If \var{secs} is not provided, the current time
-as returned by \function{time()} is used. \code{ctime(\var{secs})}
-is equivalent to \code{asctime(localtime(\var{secs}))}.
+representing local time. \code{ctime(\var{secs})} is equivalent to
+\code{asctime(localtime(\var{secs}))}.
\end{funcdesc}
\begin{datadesc}{daylight}
Nonzero if a DST timezone is defined.
\end{datadesc}
-\begin{funcdesc}{gmtime}{\optional{secs}}
+\begin{funcdesc}{gmtime}{secs}
Convert a time expressed in seconds since the epoch to a time tuple
-in UTC in which the dst flag is always zero. If \var{secs} is not
-provided, the current time as returned by \function{time()} is used.
-Fractions of a second are ignored. See above for a description of the
-tuple lay-out.
+in UTC in which the dst flag is always zero. Fractions of a second are
+ignored. See above for a description of the tuple lay-out.
\end{funcdesc}
-\begin{funcdesc}{localtime}{\optional{secs}}
+\begin{funcdesc}{localtime}{secs}
Like \function{gmtime()} but converts to local time. The dst flag is
set to \code{1} when DST applies to the given time.
\end{funcdesc}
@@ -175,11 +171,10 @@
the scheduling of other activity in the system.
\end{funcdesc}
-\begin{funcdesc}{strftime}{format\optional{, tuple}}
+\begin{funcdesc}{strftime}{format, tuple}
Convert a tuple representing a time as returned by \function{gmtime()}
or \function{localtime()} to a string as specified by the \var{format}
-argument. If \var{tuple} is not provided, the current time as returned by
-\function{localtime()} is used. \var{format} must be a string.
+argument. \var{format} must be a string.
The following directives can be embedded in the \var{format} string.
They are shown without the optional field width and precision
@@ -223,22 +218,6 @@
The range really is \code{0} to \code{61}; this accounts for leap
seconds and the (very rare) double leap seconds.
\end{description}
-
-Here is an example, a format for dates compatible with that specified
-in the \rfc{822} Internet email standard.
- \footnote{The use of \%Z is now
- deprecated, but the \%z escape that expands to the preferred
- hour/minute offset is not supported by all ANSI C libraries. Also,
- a strict reading of the original 1982 \rfc{822} standard calls for
- a two-digit year (\%y rather than \%Y), but practice moved to
- 4-digit years long before the year 2000.}
-
-\begin{verbatim}
->>> from time import *
->>> strftime("%a, %d %b %Y %H:%M:%S %Z", localtime())
-'Sat, 27 Jan 2001 05:15:05 EST'
->>>
-\end{verbatim}
Additional directives may be supported on certain platforms, but
only the ones listed here have a meaning standardized by ANSI C.
Only in main/contrib/python-2.0/dist/src/Doc/lib: libweakref.tex
diff -ru main/contrib/python-2.0/dist/src/Doc/lib/libwebbrowser.tex main/Apps/ActivePython-2.0/src/Core/Doc/lib/libwebbrowser.tex
--- main/contrib/python-2.0/dist/src/Doc/lib/libwebbrowser.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/lib/libwebbrowser.tex Mon Mar 12 16:10:19 2001
@@ -8,24 +8,13 @@
The \module{webbrowser} module provides a very high-level interface to
allow displaying Web-based documents to users. The controller objects
-are easy to use and are platform-independent. Under most
-circumstances, simply calling the \function{open()} function from this
-module will do the right thing.
+are easy to use and are platform independent.
Under \UNIX, graphical browsers are preferred under X11, but text-mode
browsers will be used if graphical browsers are not available or an X11
display isn't available. If text-mode browsers are used, the calling
process will block until the user exits the browser.
-Under \UNIX, if the environment variable \envvar{BROWSER} exists, it
-is interpreted to override the platform default list of browsers, as a
-colon-separated list of browsers to try in order. When the value of
-a list part contains the string \code{\%s}, then it is interpreted as
-a literal browser command line to be used with the argument URL
-substituted for the \code{\%s}; if the part does not contain
-\code{\%s}, it is simply interpreted as the name of the browser to
-launch.
-
For non-\UNIX{} platforms, or when X11 browsers are available on
\UNIX, the controlling process will not wait for the user to finish
with the browser, but allow the browser to maintain its own window on
@@ -39,54 +28,40 @@
The following functions are defined:
-\begin{funcdesc}{open}{url\optional{, new=0}\optional{, autoraise=1}}
+\begin{funcdesc}{open}{url\optional{, new}}
Display \var{url} using the default browser. If \var{new} is true,
- a new browser window is opened if possible. If \var{autoraise} is
- true, the window is raised if possible (note that under many window
- managers this will occur regardless of the setting of this variable).
+ a new browser window is opened if possible.
\end{funcdesc}
\begin{funcdesc}{open_new}{url}
Open \var{url} in a new window of the default browser, if possible,
- otherwise, open \var{url} in the only browser window. (This entry
- point is deprecated and may be removed in 2.1.)
+ otherwise, open \var{url} in the only browser window.
\end{funcdesc}
\begin{funcdesc}{get}{\optional{name}}
- Return a controller object for the browser type \var{name}. If
- \var{name} is empty, return a controller for a default browser
- appropriate to the caller's environment.
+ Return a controller object for the browser type \var{name}.
\end{funcdesc}
-\begin{funcdesc}{register}{name, constructor\optional{, instance}}
+\begin{funcdesc}{register}{name, constructor\optional{, controller}}
Register the browser type \var{name}. Once a browser type is
registered, the \function{get()} function can return a controller
for that browser type. If \var{instance} is not provided, or is
\code{None}, \var{constructor} will be called without parameters to
create an instance when needed. If \var{instance} is provided,
\var{constructor} will never be called, and may be \code{None}.
-
- This entry point is only useful if you plan to either set the
- \envvar{BROWSER} variable or call \function{get} with a nonempty
- argument matching the name of a handler you declare.
\end{funcdesc}
-A number of browser types are predefined. This table gives the type
-names that may be passed to the \function{get()} function and the
-corresponding instantiations for the controller classes, all defined
-in this module.
+Several browser types are defined. This table gives the type names
+that may be passed to the \function{get()} function and the names of
+the implementation classes, all defined in this module.
\begin{tableiii}{l|l|c}{code}{Type Name}{Class Name}{Notes}
- \lineiii{'mozilla'}{\class{Netscape('mozilla')}}{}
- \lineiii{'netscape'}{\class{Netscape('netscape')}}{}
- \lineiii{'mosaic'}{\class{GenericBrowser('mosaic \%s \&')}}{}
- \lineiii{'kfm'}{\class{Konqueror()}}{(1)}
- \lineiii{'grail'}{\class{Grail()}}{}
- \lineiii{'links'}{\class{GenericBrowser('links \%s')}}{}
- \lineiii{'lynx'}{\class{GenericBrowser('lynx \%s')}}{}
- \lineiii{'w3m'}{\class{GenericBrowser('w3m \%s')}}{}
+ \lineiii{'netscape'}{\class{Netscape}}{}
+ \lineiii{'kfm'}{\class{Konquerer}}{(1)}
+ \lineiii{'grail'}{\class{Grail}}{}
\lineiii{'windows-default'}{\class{WindowsDefault}}{(2)}
\lineiii{'internet-config'}{\class{InternetConfig}}{(3)}
+ \lineiii{'command-line'}{\class{CommandLineBrowser}}{}
\end{tableiii}
\noindent
@@ -94,7 +69,7 @@
\begin{description}
\item[(1)]
-``Konqueror'' is the file manager for the KDE desktop environment for
+``Konquerer'' is the file manager for the KDE desktop environment for
UNIX, and only makes sense to use if KDE is running. Some way of
reliably detecting KDE would be nice; the \envvar{KDEDIR} variable is
not sufficient.
@@ -123,6 +98,5 @@
\begin{funcdesc}{open_new}{url}
Open \var{url} in a new window of the browser handled by this
controller, if possible, otherwise, open \var{url} in the only
- browser window. (This method is deprecated and may be removed in
- 2.1.)
+ browser window.
\end{funcdesc}
Only in main/contrib/python-2.0/dist/src/Doc/lib: libxreadlines.tex
Only in main/Apps/ActivePython-2.0/src/Core/Doc/longhtml: Makefile
Only in main/Apps/ActivePython-2.0/src/Core/Doc/longhtml: README
Only in main/Apps/ActivePython-2.0/src/Core/Doc/paper-a4: Makefile
Only in main/Apps/ActivePython-2.0/src/Core/Doc/paper-letter: Makefile
diff -ru main/contrib/python-2.0/dist/src/Doc/perl/l2hinit.perl main/Apps/ActivePython-2.0/src/Core/Doc/perl/l2hinit.perl
--- main/contrib/python-2.0/dist/src/Doc/perl/l2hinit.perl Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/perl/l2hinit.perl Mon Mar 12 16:10:19 2001
@@ -25,7 +25,8 @@
$BOTTOM_NAVIGATION = 1;
$AUTO_NAVIGATION = 0;
-$BODYTEXT = '';
+# these exactly match the ActivePython colours
+$BODYTEXT = 'bgcolor="#ffffff" text="#000000"';
$CHILDLINE = "\n
\n";
$VERBOSITY = 0;
@@ -107,46 +108,39 @@
return '';
}
-@my_icon_tags = ();
-$my_icon_tags{'next'} = 'Next Page';
-$my_icon_tags{'next_page'} = 'Next Page';
-$my_icon_tags{'previous'} = 'Previous Page';
-$my_icon_tags{'previous_page'} = 'Previous Page';
-$my_icon_tags{'up'} = 'Up One Level';
-$my_icon_tags{'contents'} = 'Contents';
-$my_icon_tags{'index'} = 'Index';
-$my_icon_tags{'modules'} = 'Module Index';
-
-@my_icon_names = ();
-$my_icon_names{'previous_page'} = 'previous';
-$my_icon_names{'next_page'} = 'next';
-
-sub get_my_icon {
- my $name = @_[0];
- my $text = $my_icon_tags{$name};
- if ($my_icon_names{$name}) {
- $name = $my_icon_names{$name};
- }
- if ($text eq '') {
- $name = 'blank';
- }
+sub make_my_icon {
+ my($name, $text) = @_;
my $iconserver = ($ICONSERVER eq '.') ? '' : "$ICONSERVER/";
- return "
";
}
+$BLANK_ICON = make_my_icon('blank', '');
+
+@my_icons = ();
+$my_icons{'next_page_inactive'} = $BLANK_ICON;
+$my_icons{'previous_page_inactive'} = $BLANK_ICON;
+$my_icons{'up_page_inactive'} = $BLANK_ICON;
+$x = make_my_icon('next', 'Next Page');
+$my_icons{'next_page'} = $x;
+$my_icons{'next'} = $x;
+$x = make_my_icon('previous', 'Previous Page');
+$my_icons{'previous_page'} = $x;
+$my_icons{'previous'} = $x;
+$my_icons{'up'} = make_my_icon('up', 'Up One Level');
+$my_icons{'contents'} = make_my_icon('contents', 'Contents');
+$my_icons{'index'} = make_my_icon('index', 'Index');
+$my_icons{'modules'} = make_my_icon('modules', 'Module Index');
+
+
sub use_my_icon {
my $s = @_[0];
- if ($s =~ /\/) {
- my $r = get_my_icon($1);
- $s =~ s/\/$r/;
- }
+ $s =~ s/\/$my_icons{$1}/;
return $s;
}
sub make_nav_panel {
my $s;
- my $BLANK_ICON = get_my_icon('blank');
$NEXT = $NEXT_TITLE ? use_my_icon("$NEXT") : $BLANK_ICON;
$UP = $UP_TITLE ? use_my_icon("$UP") : $BLANK_ICON;
$PREVIOUS = $PREVIOUS_TITLE ? use_my_icon("$PREVIOUS") : $BLANK_ICON;
@@ -158,15 +152,15 @@
$s = (''
. "\n"
# left-hand side
- . "\n| $PREVIOUS | "
- . "\n$UP | "
- . "\n$NEXT | "
+ . "\n$PREVIOUS | "
+ . "\n$UP | "
+ . "\n$NEXT | "
# title box
- . "\n$t_title | "
+ . "\n$t_title | "
# right-hand side
- . "\n$CONTENTS | "
- . "\n$CUSTOM_BUTTONS | " # module index
- . "\n$INDEX | "
+ . "\n$CONTENTS | "
+ . "\n$CUSTOM_BUTTONS | " # module index
+ . "\n$INDEX | "
. "\n
\n"
# textual navigation
. make_nav_sectref("Previous", $PREVIOUS_TITLE)
@@ -178,36 +172,15 @@
return $s;
}
-sub get_version_text {
- if ($PACKAGE_VERSION ne '' && $t_date) {
- return (""
- . "Release $PACKAGE_VERSION,"
- . " documentation updated on $t_date.");
- }
- if ($PACKAGE_VERSION ne '') {
- return (""
- . "Release $PACKAGE_VERSION.");
- }
- if ($t_date) {
- return ("Documentation released on "
- . "$t_date.");
- }
- return '';
-}
-
sub top_navigation_panel {
- return "\n"
- . make_nav_panel()
- . "
\n";
+ return make_nav_panel()
+ . '
';
}
sub bot_navigation_panel {
- return "\n
\n"
- . make_nav_panel()
- . "
\n"
- . get_version_text()
- . "\n";
+ return "
"
+ . make_nav_panel();
}
sub add_link {
@@ -215,25 +188,22 @@
my($icon, $current_file, @link) = @_;
my($dummy, $file, $title) = split($delim,
$section_info{join(' ',@link)});
- if ($icon =~ /\/) {
- my $r = get_my_icon($1);
- $icon =~ s/\/$r/;
- }
+ $icon =~ s/\/$my_icons{$1}/;
if ($title && ($file ne $current_file)) {
$title = purify($title);
$title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES);
return (make_href($file, $icon), make_href($file, "$title"))
}
- elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) {
+ elsif ($icon eq $my_icons{"up"} && $EXTERNAL_UP_LINK) {
return (make_href($EXTERNAL_UP_LINK, $icon),
make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE"))
}
- elsif ($icon eq get_my_icon('previous')
+ elsif ($icon eq $my_icons{"previous"}
&& $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) {
return (make_href($EXTERNAL_PREV_LINK, $icon),
make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE"))
}
- elsif ($icon eq get_my_icon('next')
+ elsif ($icon eq $my_icons{"next"}
&& $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) {
return (make_href($EXTERNAL_DOWN_LINK, $icon),
make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE"))
@@ -243,10 +213,7 @@
sub add_special_link {
my($icon, $file, $current_file) = @_;
- if ($icon =~ /\/) {
- my $r = get_my_icon($1);
- $icon =~ s/\/$r/;
- }
+ $icon =~ s/\/$my_icons{$1}/;
return (($file && ($file ne $current_file))
? make_href($file, $icon)
: undef)
@@ -332,18 +299,9 @@
. "$key$plat###\n";
}
close(MODIDXFILE);
-
- if ($GLOBAL_MODULE_INDEX) {
- $prefix = < This index only lists modules documented in this manual.
- The Global Module
- Index lists all modules that are documented in this set
- of manuals.
-MODULE_INDEX_PREFIX
- }
if (!$allthesame) {
- $prefix .= <
Some module names are followed by an annotation indicating what
platform they are available on.
@@ -414,8 +372,8 @@
my $the_version = ''; # and the rest is
if ($t_date) { # mostly ours
$the_version = ",\n$t_date";
- if ($PACKAGE_VERSION) {
- $the_version .= ", Release $PACKAGE_VERSION";
+ if ($PYTHON_VERSION) {
+ $the_version .= ", Release $PYTHON_VERSION";
}
}
$_ = (($INFO == 1)
@@ -484,11 +442,11 @@
s/$rx/\\textohtmlmoduleindex \1 \\textohtmlindex \2/o;
# Add a button to the navigation areas:
$CUSTOM_BUTTONS .= (''
- . get_my_icon('modules')
+ . $my_icons{'modules'}
. '');
}
else {
- $CUSTOM_BUTTONS .= get_my_icon('blank');
+ $CUSTOM_BUTTONS .= $BLANK_ICON;
$global{'max_id'} = $id; # not sure why....
s/([\\]begin\s*$O\d+$C\s*theindex)/\\textohtmlindex $1/o;
s/[\\]printindex/\\textohtmlindex /o;
diff -ru main/contrib/python-2.0/dist/src/Doc/perl/python.perl main/Apps/ActivePython-2.0/src/Core/Doc/perl/python.perl
--- main/contrib/python-2.0/dist/src/Doc/perl/python.perl Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/perl/python.perl Mon Mar 12 16:10:19 2001
@@ -103,13 +103,13 @@
$DEVELOPER_ADDRESS = '';
$SHORT_VERSION = '';
-$PACKAGE_VERSION = '';
+$PYTHON_VERSION = '';
-sub do_cmd_version{ $PACKAGE_VERSION . @_[0]; }
+sub do_cmd_version{ $PYTHON_VERSION . @_[0]; }
sub do_cmd_shortversion{ $SHORT_VERSION . @_[0]; }
sub do_cmd_release{
local($_) = @_;
- $PACKAGE_VERSION = next_argument();
+ $PYTHON_VERSION = next_argument();
return $_;
}
@@ -243,8 +243,8 @@
local($_) = @_;
my $newsgroup = next_argument();
my $icon = get_link_icon("news:$newsgroup");
- my $stuff = ""
- . "$newsgroup$icon";
+ my $stuff = ""
+ . "$newsgroup$icon";
return $stuff . $_;
}
@@ -254,11 +254,11 @@
my($name,$aname,$ahref) = new_link_info();
# The here is really to keep buildindex.py from making
# the variable name case-insensitive.
- add_index_entry("environment variables!$envvar@$envvar",
+ add_index_entry("environment variables!$envvar@\$$envvar",
$ahref);
- add_index_entry("$envvar (environment variable)", $ahref);
+ add_index_entry("$envvar@\$$envvar", $ahref);
$aname =~ s/" . $_;
+ return "$aname\$$envvar" . $_;
}
sub do_cmd_url{
@@ -278,22 +278,16 @@
return "$page($section)" . $_;
}
-$PEP_FORMAT = "http://python.sourceforge.net/peps/pep-XXXX.html";
-$RFC_FORMAT = "http://www.ietf.org/rfc/rfcXXXX.txt";
-
-sub get_rfc_url($$){
- my($rfcnum, $format) = @_;
- $rfcnum = sprintf("%04d", $rfcnum);
- $format = "$format";
- $format =~ s/XXXX/$rfcnum/;
- return $format;
+sub get_pep_url{
+ my $rfcnum = sprintf("%04d", @_[0]);
+ return "http://python.sourceforge.net/peps/pep-$rfcnum.html";
}
sub do_cmd_pep{
local($_) = @_;
my $rfcnumber = next_argument();
my $id = "rfcref-" . ++$global{'max_id'};
- my $href = get_rfc_url($rfcnumber, $PEP_FORMAT);
+ my $href = get_pep_url($rfcnumber);
my $icon = get_link_icon($href);
# Save the reference
my $nstr = gen_index_id("Python Enhancement Proposals!PEP $rfcnumber", '');
@@ -302,11 +296,16 @@
. "$icon" . $_);
}
+sub get_rfc_url{
+ my $rfcnum = sprintf("%04d", @_[0]);
+ return "http://www.ietf.org/rfc/rfc$rfcnum.txt";
+}
+
sub do_cmd_rfc{
local($_) = @_;
my $rfcnumber = next_argument();
my $id = "rfcref-" . ++$global{'max_id'};
- my $href = get_rfc_url($rfcnumber, $RFC_FORMAT);
+ my $href = get_rfc_url($rfcnumber);
my $icon = get_link_icon($href);
# Save the reference
my $nstr = gen_index_id("RFC!RFC $rfcnumber", '');
@@ -338,18 +337,14 @@
local($_) = @_;
my $release = next_argument();
my $reason = next_argument();
- return (''
- . "Deprecated since release $release."
- . "\n$reason
"
- . $_);
+ return "Deprecated since release $release.\n$reason
" . $_;
}
sub do_cmd_versionadded{
# one parameter: \versionadded{version}
local($_) = @_;
my $release = next_argument();
- return ("\nNew in version $release.\n"
- . $_);
+ return "\nNew in version $release.\n" . $_;
}
sub do_cmd_versionchanged{
@@ -357,11 +352,11 @@
local($_) = @_;
my $explanation = next_optional_argument();
my $release = next_argument();
- my $text = "Changed in version $release.";
- if ($explanation) {
- $text = "Changed in version $release:\n$explanation.";
+ my $text = "\nChanged in version $release.\n";
+ if ($release) {
+ $text = "\nChanged in version $release:\n$explanation.\n";
}
- return "\n$text\n" . $_;
+ return $text . $_;
}
#
@@ -504,9 +499,6 @@
&$cmd($ahref);
}
}
- if (/^[ \t\r\n]/) {
- $_ = substr($_, 1);
- }
return "$aname$anchor_invisible_mark" . $_;
}
@@ -597,7 +589,7 @@
my $nstr = $1;
$Modules{$nstr} .= $ahref;
}
- return "$aname$anchor_invisible_mark2";
+ return "$aname$anchor_invisible_mark";
}
@@ -615,7 +607,7 @@
}
$word = "$word " if $word;
$THIS_MODULE = "$name";
- $INDEX_SUBITEM = "(in module $name)";
+ $INDEX_SUBITEM = "(in $name)";
print "[$name]";
return make_mod_index_entry(
"$name (${word}module)", 'DEF');
@@ -655,8 +647,7 @@
sub do_cmd_nodename{ return do_cmd_label(@_); }
sub init_myformat{
- $anchor_invisible_mark = ' ';
- $anchor_invisible_mark2 = '';
+ $anchor_invisible_mark = '';
$anchor_mark = '';
$icons{'anchor_mark'} = '';
}
@@ -882,7 +873,7 @@
local($_) = @_;
my $excname = next_argument();
my $idx = make_str_index_entry("$excname");
- return "
- exception $idx\n
- " . $_ . '
'
+ return "- $idx\n
- " . $_ . '
'
}
sub do_env_fulllineitems{ return do_env_itemize(@_); }
@@ -895,9 +886,7 @@
$idx = make_str_index_entry(
"$THIS_CLASS ($what in $THIS_MODULE)" );
$idx =~ s/ \(.*\)//;
- return ("- $what $idx ($arg_list)\n
- "
- . $_
- . '
');
+ return "- $idx ($arg_list)\n
- " . $_ . '
';
}
sub do_env_classdesc{
@@ -1029,21 +1018,12 @@
elsif ($font eq 'member') {
$font = 'tt class="member"';
}
- elsif ($font eq 'class') {
- $font = 'tt class="class"';
- }
elsif ($font eq 'constant') {
$font = 'tt class="constant"';
}
elsif ($font eq 'kbd') {
$font = 'kbd';
}
- elsif ($font eq 'programopt') {
- $font = 'b';
- }
- elsif ($font eq 'exception') {
- $font = 'tt class="exception"';
- }
return $font;
}
@@ -1085,7 +1065,7 @@
$efont = "$font>";
$efont =~ s/ .*>/>/;
}
- return ($sfont, $efont);
+ return ($font, $sfont, $efont);
}
sub do_env_tableii{
@@ -1100,14 +1080,13 @@
my $a2 = $col_aligns[1];
s/\\lineii\\lineii[$a1|$a2]'
- . "\n "
- . "\n "
- . $_
+ . $_
. "\n "
. "\n";
}
@@ -1122,11 +1101,11 @@
my $c1 = next_argument();
my $c2 = next_argument();
s/[\s\n]+//;
- my($sfont,$efont) = get_table_col1_fonts();
+ my($font,$sfont,$efont) = get_table_col1_fonts();
$c2 = ' ' if ($c2 eq '');
my($c1align,$c2align) = split('\|', $aligns);
my $padding = '';
- if ($c1align =~ /align="right"/ || $c1 eq '') {
+ if ($c1align =~ /align="right"/) {
$padding = ' ';
}
return "\n $c1align$sfont$c1$efont$padding\n"
@@ -1148,12 +1127,11 @@
my $a3 = $col_aligns[2];
s/\\lineiii\\lineiii[$a1|$a2|$a3]'
- . "\n "
- . "\n
"
. $_
@@ -1172,11 +1150,11 @@
my $c2 = next_argument();
my $c3 = next_argument();
s/[\s\n]+//;
- my($sfont,$efont) = get_table_col1_fonts();
+ my($font,$sfont,$efont) = get_table_col1_fonts();
$c3 = ' ' if ($c3 eq '');
my($c1align,$c2align,$c3align) = split('\|', $aligns);
my $padding = '';
- if ($c1align =~ /align="right"/ || $c1 eq '') {
+ if ($c1align =~ /align="right"/) {
$padding = ' ';
}
return "\n $c1align$sfont$c1$efont$padding\n"
@@ -1201,13 +1179,12 @@
my $a4 = $col_aligns[3];
s/\\lineiv\\lineiv[$a1|$a2|$a3|$a4]'
- . "\n "
- . "\n
"
. $_
@@ -1227,11 +1204,11 @@
my $c3 = next_argument();
my $c4 = next_argument();
s/[\s\n]+//;
- my($sfont,$efont) = get_table_col1_fonts();
+ my($font,$sfont,$efont) = get_table_col1_fonts();
$c4 = ' ' if ($c4 eq '');
my($c1align,$c2align,$c3align,$c4align) = split('\|', $aligns);
my $padding = '';
- if ($c1align =~ /align="right"/ || $c1 eq '') {
+ if ($c1align =~ /align="right"/) {
$padding = ' ';
}
return "\n $c1align$sfont$c1$efont$padding\n"
@@ -1292,11 +1269,11 @@
$the_title .= "\n$t_affil
";
}
if ($t_date) {
- $the_title .= "\n";
- if ($PACKAGE_VERSION) {
- $the_title .= "Release $PACKAGE_VERSION
\n";
+ $the_title .= "\n
$t_date";
+ if ($PYTHON_VERSION) {
+ $the_title .= "
Release $PYTHON_VERSION";
}
- $the_title .= "$t_date
"
+ $the_title .= ""
}
if ($t_address) {
$the_title .= "\n$t_address
";
@@ -1498,11 +1475,11 @@
}
sub handle_rfclike_reference{
- local($_, $what, $format) = @_;
+ local($_, $what) = @_;
my $rfcnum = next_argument();
my $title = next_argument();
my $text = next_argument();
- my $url = get_rfc_url($rfcnum, $format);
+ my $url = get_rfc_url($rfcnum);
my $icon = get_link_icon($url);
return ''
. "\n - } should be returned. The return value must be a
-string object.
-
-This is typically used for debugging, so it is important that the
-representation is information-rich and unambiguous.
+string representation of an object. This should normally look like a
+valid Python expression that can be used to recreate an object with
+the same value. By convention, objects which cannot be trivially
+converted to strings which can be used to create a similar object
+produce a string of the form \samp{<\var{...some useful
+description...}>}.
\indexii{string}{conversion}
\indexii{reverse}{quotes}
\indexii{backward}{quotes}
@@ -952,47 +921,11 @@
``informal'' string representation of an object. This differs from
\method{__repr__()} in that it does not have to be a valid Python
expression: a more convenient or concise representation may be used
-instead. The return value must be a string object.
-\end{methoddesc}
-
-\begin{methoddesc}[object]{__lt__}{self, other}
-\methodline[object]{__le__}{self, other}
-\methodline[object]{__eq__}{self, other}
-\methodline[object]{__ne__}{self, other}
-\methodline[object]{__gt__}{self, other}
-\methodline[object]{__ge__}{self, other}
-\versionadded{2.1}
-These are the so-called ``rich comparison'' methods, and are called
-for comparison operators in preference to \method{__cmp__()} below.
-The correspondence between operator symbols and method names is as
-follows:
-\code{\var{x}<\var{y}} calls \code{\var{x}.__lt__(\var{y})},
-\code{\var{x}<=\var{y}} calls \code{\var{x}.__le__(\var{y})},
-\code{\var{x}==\var{y}} calls \code{\var{x}.__eq__(\var{y})},
-\code{\var{x}!=\var{y}} and \code{\var{x}<>\var{y}} call
-\code{\var{x}.__ne__(\var{y})},
-\code{\var{x}>\var{y}} calls \code{\var{x}.__gt__(\var{y})}, and
-\code{\var{x}>=\var{y}} calls \code{\var{x}.__ge__(\var{y})}.
-These methods can return any value, but if the comparison operator is
-used in a Boolean context, the return value should be interpretable as
-a Boolean value, else a \exception{TypeError} will be raised.
-By convention, \code{0} is used for false and \code{1} for true.
-
-There are no reflected (swapped-argument) versions of these methods
-(to be used when the left argument does not support the operation but
-the right argument does); rather, \method{__lt__()} and
-\method{__gt__()} are each other's reflection, \method{__le__()} and
-\method{__ge__()} are each other's reflection, and \method{__eq__()}
-and \method{__ne__()} are their own reflection.
-
-Arguments to rich comparison methods are never coerced. A rich
-comparison method may return \code{NotImplemented} if it does not
-implement the operation for a given pair of arguments.
+instead.
\end{methoddesc}
\begin{methoddesc}[object]{__cmp__}{self, other}
-Called by comparison operations if rich comparison (see above) is not
-defined. Should return a negative integer if
+Called by all comparison operations. Should return a negative integer if
\code{self < other}, zero if \code{self == other}, a positive integer if
\code{self > other}. If no \method{__cmp__()} operation is defined, class
instances are compared by object identity (``address'').
@@ -1003,7 +936,14 @@
\end{methoddesc}
\begin{methoddesc}[object]{__rcmp__}{self, other}
- \versionchanged[No longer supported]{2.1}
+Called by all comparison operations. Should return a negative integer if
+\code{self < other}, zero if \code{self == other}, a positive integer if
+\code{self > other}. If no \method{__cmp__()} operation is defined, class
+instances are compared by object identity (``address'').
+(Note: the restriction that exceptions are not propagated by
+\method{__cmp__()} has been removed in Python 1.5.)
+\bifuncindex{cmp}
+\index{comparisons}
\end{methoddesc}
\begin{methoddesc}[object]{__hash__}{self}
@@ -1336,7 +1276,7 @@
\code{-}, \code{*}, \code{/}, \code{\%},
\function{divmod()}\bifuncindex{divmod},
\function{pow()}\bifuncindex{pow}, \code{**}, \code{<<}, \code{>>},
-\code{\&}, \code{\^}, \code{|}) with reflected (swapped) operands. These
+\code{\&}, \code{\^}, \code{|}) with reversed operands. These
functions are only called if the left operand does not support the
corresponding operation. For instance, to evaluate the expression
\var{x}\code{-}\var{y}, where \var{y} is an instance of a class that
@@ -1346,32 +1286,6 @@
complicated).
\end{methoddesc}
-\begin{methoddesc}[numeric object]{__iadd__}{self, other}
-\methodline[numeric object]{__isub__}{self, other}
-\methodline[numeric object]{__imul__}{self, other}
-\methodline[numeric object]{__idiv__}{self, other}
-\methodline[numeric object]{__imod__}{self, other}
-\methodline[numeric object]{__ipow__}{self, other\optional{, modulo}}
-\methodline[numeric object]{__ilshift__}{self, other}
-\methodline[numeric object]{__irshift__}{self, other}
-\methodline[numeric object]{__iand__}{self, other}
-\methodline[numeric object]{__ixor__}{self, other}
-\methodline[numeric object]{__ior__}{self, other}
-These methods are called to implement the augmented arithmetic operations
-(\code{+=}, \code{-=}, \code{*=}, \code{/=}, \code{\%=}, \code{**=},
-\code{<<=}, \code{>>=}, \code{\&=}, \code{\^=}, \code{|=}). These methods
-should attempt to do the operation in-place (modifying \var{self}) and
-return the result (which could be, but does not have to be, \var{self}). If
-a specific method is not defined, the augmented operation falls back to the
-normal methods. For instance, to evaluate the expression
-\var{x}\code{+=}\var{y}, where \var{x} is an instance of a class that has an
-\method{__iadd__()} method, \code{\var{x}.__iadd__(\var{y})} is called. If
-\var{x} is an instance of a class that does not define a \method{__iadd()}
-method, \code{\var{x}.__add__(\var{y})} and \code{\var{y}.__radd__(\var{x})}
-are considered, as with the evaluation of \var{x}\code{+}\var{y}.
-
-\end{methoddesc}
-
\begin{methoddesc}[numeric object]{__neg__}{self}
\methodline[numeric object]{__pos__}{self}
\methodline[numeric object]{__abs__}{self}
@@ -1424,55 +1338,55 @@
\item[1.] If \var{x} is a class instance:
- \begin{itemize}
+ \begin{itemize}
- \item[1a.] If \var{x} has a \method{__coerce__()} method:
- replace \var{x} and \var{y} with the 2-tuple returned by
- \code{\var{x}.__coerce__(\var{y})}; skip to step 2 if the
- coercion returns \code{None}.
+ \item[1a.] If \var{x} has a \method{__coerce__()} method:
+ replace \var{x} and \var{y} with the 2-tuple returned by
+ \code{\var{x}.__coerce__(\var{y})}; skip to step 2 if the
+ coercion returns \code{None}.
- \item[1b.] If neither \var{x} nor \var{y} is a class instance
- after coercion, go to step 3.
+ \item[1b.] If neither \var{x} nor \var{y} is a class instance
+ after coercion, go to step 3.
- \item[1c.] If \var{x} has a method \method{__op__()}, return
- \code{\var{x}.__op__(\var{y})}; otherwise, restore \var{x} and
- \var{y} to their value before step 1a.
+ \item[1c.] If \var{x} has a method \method{__op__()}, return
+ \code{\var{x}.__op__(\var{y})}; otherwise, restore \var{x} and
+ \var{y} to their value before step 1a.
- \end{itemize}
+ \end{itemize}
\item[2.] If \var{y} is a class instance:
- \begin{itemize}
+ \begin{itemize}
- \item[2a.] If \var{y} has a \method{__coerce__()} method:
- replace \var{y} and \var{x} with the 2-tuple returned by
- \code{\var{y}.__coerce__(\var{x})}; skip to step 3 if the
- coercion returns \code{None}.
+ \item[2a.] If \var{y} has a \method{__coerce__()} method:
+ replace \var{y} and \var{x} with the 2-tuple returned by
+ \code{\var{y}.__coerce__(\var{x})}; skip to step 3 if the
+ coercion returns \code{None}.
- \item[2b.] If neither \var{x} nor \var{y} is a class instance
- after coercion, go to step 3.
+ \item[2b.] If neither \var{x} nor \var{y} is a class instance
+ after coercion, go to step 3.
- \item[2b.] If \var{y} has a method \method{__rop__()}, return
- \code{\var{y}.__rop__(\var{x})}; otherwise, restore \var{x}
- and \var{y} to their value before step 2a.
+ \item[2b.] If \var{y} has a method \method{__rop__()}, return
+ \code{\var{y}.__rop__(\var{x})}; otherwise, restore \var{x}
+ and \var{y} to their value before step 2a.
- \end{itemize}
+ \end{itemize}
\item[3.] We only get here if neither \var{x} nor \var{y} is a class
instance.
- \begin{itemize}
+ \begin{itemize}
- \item[3a.] If op is `\code{+}' and \var{x} is a sequence,
- sequence concatenation is invoked.
+ \item[3a.] If op is `\code{+}' and \var{x} is a sequence,
+ sequence concatenation is invoked.
- \item[3b.] If op is `\code{*}' and one operand is a sequence
- and the other an integer, sequence repetition is invoked.
+ \item[3b.] If op is `\code{*}' and one operand is a sequence
+ and the other an integer, sequence repetition is invoked.
- \item[3c.] Otherwise, both operands must be numbers; they are
- coerced to a common type if possible, and the numeric
- operation is invoked for that type.
+ \item[3c.] Otherwise, both operands must be numbers; they are
+ coerced to a common type if possible, and the numeric
+ operation is invoked for that type.
- \end{itemize}
+ \end{itemize}
\end{itemize}
diff -ru main/contrib/python-2.0/dist/src/Doc/ref/ref4.tex main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref4.tex
--- main/contrib/python-2.0/dist/src/Doc/ref/ref4.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref4.tex Mon Mar 12 16:10:19 2001
@@ -24,121 +24,136 @@
`\strong{-c}' option) is a code block. The file read by the built-in
function \function{execfile()} is a code block. The string argument
passed to the built-in function \function{eval()} and to the
-\keyword{exec}\stindex{exec} statement is a code block. And finally,
-the expression read and evaluated by the built-in function
-\function{input()} is a code block.
+\keyword{exec} statement is a code block. And finally, the expression
+read and evaluated by the built-in function \function{input()} is a
+code block.
A code block is executed in an execution frame. An \dfn{execution
frame}\indexii{execution}{frame} contains some administrative
information (used for debugging), determines where and how execution
continues after the code block's execution has completed, and (perhaps
-most importantly) defines the environment in which names are resolved.
+most importantly) defines two namespaces, the local and the global
+namespace, that affect execution of the code block.
-A \dfn{namespace}\indexii{namespace} is a mapping from names
-(identifiers) to objects. An \dfn{environment}\index{environment} is
-a hierarchical collection of the namespaces that are visible to a
-particular code block. Python namespaces are statically scoped in the
-tradition of Algol, but also has \keyword{global} statement that can
-be used to access the top-level namespace on the environment.
-
-Names refers to objects. Names are introduced by name
-\dfn{binding}\indexii{binding}{name} operations. Each occurrence of a name
-in the program text refers to the binding of that name established in
-the innermost function namespace containing the use. Changing the
-mapping of a name to an object is called
-\dfn{rebinding}\indexii{rebinding}{name}; removing a name is
+A \dfn{namespace}\index{namespace} is a mapping from names
+(identifiers) to objects. A particular namespace may be referenced by
+more than one execution frame, and from other places as well. Adding
+a name to a namespace is called \dfn{binding}\indexii{binding}{name} a
+name (to an object); changing the mapping of a name is called
+\dfn{rebinding}\indexii{rebinding}{name}; removing a name is
\dfn{unbinding}\indexii{unbinding}{name}. Namespaces are functionally
equivalent to dictionaries (and often implemented as dictionaries).
-When a name is bound, a mapping is created in the \dfn{local
-namespace}\indexii{local}{namespace} of the execution frame unless the
-name is declared global. If a name binding operation occurs anywhere
-within a code block, all uses of the name within the block are treated
-as references to the local namespace. (Note: This can lead to errors
-when a name is used within a block before it is bound.)
-
-The \dfn{global namespace}\indexii{global}{namespace} determines the
-place where names listed in \keyword{global}\stindex{global}
-statements are defined and searched. The global namespace of a block
-is the namespace of the module in which the block was defined.
-
-If a name is used within a code block, but it is not bound there and
-is not declared global, it is a \dfn{free variable}
-\indexii{free}{variable}. A free variable is resolved using the
-nearest enclosing function block that has a binding for the name. If
-no such block exists, the name is resolved in the global namespace.
-
-When a name is not found at all, a
-\exception{NameError}\withsubitem{(built-in
-exception)}{\ttindex{NameError}} exception is raised.
-
-The local namespace of a class definition becomes the attribute
-dictionary of the class. If a block is contained within a class
-definition, the name bindings that occur in the containing class block
-are not visible to enclosed blocks.
-
-The following constructs bind names: formal parameters to functions,
-\keyword{import} statements, class and function definitions (these bind
-the class or function name in the defining block), and identifiers
-occurring as the target of an assignment, in a \keyword{for} loop header
-(including list comprehensions), or in the second position of an
-\keyword{except} clause.
+The \dfn{local namespace}\indexii{local}{namespace} of an execution
+frame determines the default place where names are defined and
+searched. The
+\dfn{global namespace}\indexii{global}{namespace} determines the place
+where names listed in \keyword{global}\stindex{global} statements are
+defined and searched, and where names that are not bound anywhere in
+the current code block are searched.
Whether a name is local or global in a code block is determined by
static inspection of the source text for the code block: in the
-absence of \keyword{global}\stindex{global} statements, a name that is
-bound anywhere in the code block is local in the entire code block;
-all other names are considered global. The \keyword{global} statement
-forces global interpretation of selected names throughout the code
-block.
-
-The following constructs bind names: formal parameters to functions,
+absence of \keyword{global} statements, a name that is bound anywhere
+in the code block is local in the entire code block; all other names
+are considered global. The \keyword{global} statement forces global
+interpretation of selected names throughout the code block. The
+following constructs bind names: formal parameters to functions,
\keyword{import} statements, class and function definitions (these
bind the class or function name in the defining block), and targets
that are identifiers if occurring in an assignment, \keyword{for} loop
header, or in the second position of an \keyword{except} clause
-header. The \keyword{import} statement of the form ``\samp{from
-\ldots import *}''\stindex{from} binds all names defined in the
-imported module, except those beginning with an underscore. This form
-may only be used at the module level.
+header. Local names are searched only on the local namespace; global
+names are searched only in the global and built-in
+namespace.\footnote{
+ If the code block contains \keyword{exec} statements or the
+ construct ``\samp{from \ldots import *}'', the semantics of local
+ names change: local name lookup first searches the local namespace,
+ then the global namespace and the built-in namespace.}
A target occurring in a \keyword{del} statement is also considered bound
-for this purpose (though the actual semantics are to unbind the
-name). It is illegal to unbind a name that is referenced by an
-enclosing scope; the compiler will report a \exception{SyntaxError}.
+for this purpose (though the actual semantics are to ``unbind'' the
+name).
When a global name is not found in the global namespace, it is
searched in the built-in namespace (which is actually the global
-namespace of the module \module{__builtin__}\refbimodindex{__builtin__}).
-The built-in namespace associated with the execution of a code block
-is actually found by looking up the name \code{__builtins__} in its
-global namespace; this should be a dictionary or a module (in the
-latter case the module's dictionary is used). Normally, the
-\code{__builtins__} namespace is the dictionary of the built-in module
-\module{__builtin__} (note: no `s'). If it isn't, restricted
-execution\indexii{restricted}{execution} mode is in effect.
-
-The namespace for a module is automatically created the first time a
-module is imported. The main module for a script is always called
-\module{__main__}\refbimodindex{__main__}.
-
-The \function{eval()}, \function{execfile()}, and \function{input()}
-functions and the \keyword{exec} statement do not have access to the
-full environment for resolving names. Names may be resolved in the
-local and global namespaces of the caller. Free variables are not
-resolved in the nearest enclosing namespaces, but in the global
-namespace.\footnote{This limitation occurs because the code that is
- executed by these operations is not available at the time the
- module is compiled.}
-The \keyword{exec} statement and the \function{eval()} and
+namespace of the module
+\module{__builtin__}\refbimodindex{__builtin__}). The built-in
+namespace associated with the execution of a code block is actually
+found by looking up the name \code{__builtins__} is its global
+namespace; this should be a dictionary or a module (in the latter case
+its dictionary is used). Normally, the \code{__builtins__} namespace
+is the dictionary of the built-in module \module{__builtin__} (note:
+no `s'); if it isn't, restricted
+execution\indexii{restricted}{execution} mode is in effect. When a
+name is not found at all, a
+\exception{NameError}\withsubitem{(built-in
+exception)}{\ttindex{NameError}} exception is raised.
+\stindex{from}
+\stindex{exec}
+\stindex{global}
+
+The following table lists the meaning of the local and global
+namespace for various types of code blocks. The namespace for a
+particular module is automatically created when the module is first
+imported (i.e., when it is loaded). Note that in almost all cases,
+the global namespace is the namespace of the containing module ---
+scopes in Python do not nest!
+
+\begin{tableiv}{l|l|l|l}{textrm}
+ {Code block type}{Global namespace}{Local namespace}{Notes}
+ \lineiv{Module}
+ {n.s. for this module}
+ {same as global}{}
+ \lineiv{Script (file or command)}
+ {n.s. for \module{__main__}\refbimodindex{__main__}}
+ {same as global}{(1)}
+ \lineiv{Interactive command}
+ {n.s. for \module{__main__}\refbimodindex{__main__}}
+ {same as global}{}
+ \lineiv{Class definition}
+ {global n.s. of containing block}
+ {new n.s.}{}
+ \lineiv{Function body}
+ {global n.s. of containing block}
+ {new n.s.}{(2)}
+ \lineiv{String passed to \keyword{exec} statement}
+ {global n.s. of containing block}
+ {local n.s. of containing block}{(2), (3)}
+ \lineiv{String passed to \function{eval()}}
+ {global n.s. of caller}
+ {local n.s. of caller}{(2), (3)}
+ \lineiv{File read by \function{execfile()}}
+ {global n.s. of caller}
+ {local n.s. of caller}{(2), (3)}
+ \lineiv{Expression read by \function{input()}}
+ {global n.s. of caller}
+ {local n.s. of caller}{}
+\end{tableiv}
+
+Notes:
+
+\begin{description}
+
+\item[n.s.] means \emph{namespace}
+
+\item[(1)] The main module for a script is always called
+\module{__main__}; ``the filename don't enter into it.''
+
+\item[(2)] The global and local namespace for these can be
+overridden with optional extra arguments.
+
+\item[(3)] The \keyword{exec} statement and the \function{eval()} and
\function{execfile()} functions have optional arguments to override
the global and local namespace. If only one namespace is specified,
it is used for both.
-The built-in functions \function{globals()} and \function{locals()}
-each return a dictionary, representing the current global and local
-namespace respectively. The effect of modifications to these
-dictionaries on the namespace are undefined.\footnote{
+\end{description}
+
+The built-in functions \function{globals()} and \function{locals()} returns a
+dictionary representing the current global and local namespace,
+respectively. The effect of modifications to this dictionary on the
+namespace are undefined.\footnote{
The current implementations return the dictionary actually used to
implement the namespace, \emph{except} for functions, where the
optimizer may cause the local namespace to be implemented
diff -ru main/contrib/python-2.0/dist/src/Doc/ref/ref5.tex main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref5.tex
--- main/contrib/python-2.0/dist/src/Doc/ref/ref5.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref5.tex Mon Mar 12 16:10:19 2001
@@ -264,9 +264,9 @@
\end{verbatim}
The primary must evaluate to an object of a type that supports
-attribute references, e.g., a module, list, or an instance. This
-object is then asked to produce the attribute whose name is the
-identifier. If this attribute is not available, the exception
+attribute references, e.g., a module or a list. This object is then
+asked to produce the attribute whose name is the identifier. If this
+attribute is not available, the exception
\exception{AttributeError}\exindex{AttributeError} is raised.
Otherwise, the type and value of the object produced is determined by
the object. Multiple evaluations of the same attribute reference may
@@ -568,9 +568,9 @@
The \code{*} (multiplication) operator yields the product of its
arguments. The arguments must either both be numbers, or one argument
-must be an integer (plain or long) and the other must be a sequence.
-In the former case, the numbers are converted to a common type and
-then multiplied together. In the latter case, sequence repetition is
+must be a plain integer and the other must be a sequence. In the
+former case, the numbers are converted to a common type and then
+multiplied together. In the latter case, sequence repetition is
performed; a negative repetition factor yields an empty sequence.
\index{multiplication}
@@ -758,13 +758,13 @@
The operators \keyword{in} and \keyword{not in} test for set
membership: every type can define membership in whatever way is
-appropriate. Traditionally, this interface has been tightly bound to
+appropriate. Traditionally, this interface has been tightly bound
the sequence interface, which is related in that presence in a sequence
can be usefully interpreted as membership in a set.
-For the list and tuple types, \code{\var{x} in \var{y}} is true if and
-only if there exists such an index \var{i} such that
-\code{\var{x} == \var{y}[\var{i}]} is true.
+For the list, tuple types, \code{\var{x} in \var{y}} is true if and only
+if there exists such an index \var{i} such that
+\code{var{x} == \var{y}[\var{i}]} is true.
For the Unicode and string types, \code{\var{x} in \var{y}} is true if
and only if there exists an index \var{i} such that \code{\var{x} ==
@@ -899,8 +899,7 @@
Operators in the same box have the same precedence. Unless the syntax
is explicitly given, operators are binary. Operators in the same box
group left to right (except for comparisons, which chain from left to
-right --- see above, and exponentiation, which groups from right to
-left).
+right --- see above).
\begin{tableii}{c|l}{textrm}{Operator}{Description}
\lineii{\keyword{lambda}} {Lambda expression}
diff -ru main/contrib/python-2.0/dist/src/Doc/ref/ref6.tex main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref6.tex
--- main/contrib/python-2.0/dist/src/Doc/ref/ref6.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref6.tex Mon Mar 12 16:10:19 2001
@@ -576,6 +576,11 @@
\kwindex{from}
\stindex{from}
+(The current implementation does not enforce the latter two
+restrictions, but programs should not abuse this freedom, as future
+implementations may enforce them or silently change the meaning of the
+program.)
+
\strong{Hierarchical module names:}\indexiii{hierarchical}{module}{names}
when the module names contains one or more dots, the module search
path is carried out differently. The sequence of identifiers up to
diff -ru main/contrib/python-2.0/dist/src/Doc/ref/ref7.tex main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref7.tex
--- main/contrib/python-2.0/dist/src/Doc/ref/ref7.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref7.tex Mon Mar 12 16:10:19 2001
@@ -181,7 +181,7 @@
("except" [expression ["," target]] ":" suite)+
["else" ":" suite]
try_fin_stmt: "try" ":" suite
- "finally" ":" suite
+ "finally" ":" suite
\end{verbatim}
There are two forms of \keyword{try} statement:
@@ -242,17 +242,10 @@
\withsubitem{(in module sys)}{\ttindex{exc_type}
\ttindex{exc_value}\ttindex{exc_traceback}}
-The optional \keyword{else} clause is executed if and when control
-flows off the end of the \keyword{try} clause.\footnote{
- Currently, control ``flows off the end'' except in the case of an
- exception or the execution of a \keyword{return},
- \keyword{continue}, or \keyword{break} statement.
-} Exceptions in the \keyword{else} clause are not handled by the
-preceding \keyword{except} clauses.
+The optional \keyword{else} clause is executed when no exception occurs
+in the \keyword{try} clause. Exceptions in the \keyword{else} clause are
+not handled by the preceding \keyword{except} clauses.
\kwindex{else}
-\stindex{return}
-\stindex{break}
-\stindex{continue}
The \keyword{try}...\keyword{finally} form specifies a `cleanup' handler. The
\keyword{try} clause is executed. When no exception occurs, the
@@ -260,19 +253,17 @@
\keyword{try} clause, the exception is temporarily saved, the
\keyword{finally} clause is executed, and then the saved exception is
re-raised. If the \keyword{finally} clause raises another exception or
-executes a \keyword{return} or \keyword{break} statement, the saved
-exception is lost. A \keyword{continue} statement is illegal in the
-\keyword{finally} clause. (The reason is a problem with the current
-implementation -- thsi restriction may be lifted in the future). The
-exception information is not available to the program during execution of
-the \keyword{finally} clause.
+executes a \keyword{return}, \keyword{break} or \keyword{continue} statement,
+the saved exception is lost. The exception information is not
+available to the program during execution of the \keyword{finally}
+clause.
\kwindex{finally}
-When a \keyword{return}, \keyword{break} or \keyword{continue} statement is
-executed in the \keyword{try} suite of a \keyword{try}...\keyword{finally}
-statement, the \keyword{finally} clause is also executed `on the way out.' A
-\keyword{continue} statement is illegal in the \keyword{finally} clause.
-(The reason is a problem with the current implementation --- this
+When a \keyword{return} or \keyword{break} statement is executed in the
+\keyword{try} suite of a \keyword{try}...\keyword{finally} statement, the
+\keyword{finally} clause is also executed `on the way out.' A
+\keyword{continue} statement is illegal in the \keyword{try} clause. (The
+reason is a problem with the current implementation --- this
restriction may be lifted in the future).
\stindex{return}
\stindex{break}
diff -ru main/contrib/python-2.0/dist/src/Doc/ref/ref8.tex main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref8.tex
--- main/contrib/python-2.0/dist/src/Doc/ref/ref8.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/ref/ref8.tex Mon Mar 12 16:10:19 2001
@@ -28,7 +28,7 @@
The interpreter may also be invoked in interactive mode; in this case,
it does not read and execute a complete program but reads and executes
one statement (possibly compound) at a time. The initial environment
-is identical to that of a complete program; each statement is executed
+is identical to that of a coplete program; each statement is executed
in the namespace of \module{__main__}.
\index{interactive mode}
\refbimodindex{__main__}
Only in main/contrib/python-2.0/dist/src/Doc: sgml
Only in main/Apps/ActivePython-2.0/src/Core/Doc/texinputs: CVS
diff -ru main/contrib/python-2.0/dist/src/Doc/texinputs/boilerplate.tex main/Apps/ActivePython-2.0/src/Core/Doc/texinputs/boilerplate.tex
--- main/contrib/python-2.0/dist/src/Doc/texinputs/boilerplate.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/texinputs/boilerplate.tex Mon Mar 12 16:10:19 2001
@@ -1,10 +1,10 @@
\author{Guido van Rossum\\
Fred L. Drake, Jr., editor}
\authoraddress{
- \strong{PythonLabs}\\
+ BeOpen PythonLabs\\
E-mail: \email{python-docs@python.org}
}
-\date{\today} % XXX update before release!
-\release{2.1 beta 1} % software release, not documentation
-\setshortversion{2.1} % major.minor only for software
+\date{October 16, 2000} % XXX update before release!
+\release{2.0} % software release, not documentation
+\setshortversion{2.0} % major.minor only for software
Only in main/Apps/ActivePython-2.0/src/Core/Doc/tools: CVS
Only in main/Apps/ActivePython-2.0/src/Core/Doc/tools: buildindex.pyc
Only in main/Apps/ActivePython-2.0/src/Core/Doc/tools: support.pyc
diff -ru main/contrib/python-2.0/dist/src/Doc/tut/tut.tex main/Apps/ActivePython-2.0/src/Core/Doc/tut/tut.tex
--- main/contrib/python-2.0/dist/src/Doc/tut/tut.tex Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Doc/tut/tut.tex Mon Mar 12 16:10:19 2001
@@ -470,7 +470,7 @@
\begin{verbatim}
>>> a=1.5+0.5j
>>> float(a)
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1, in ?
TypeError: can't convert complex to float; use e.g. abs(z)
>>> a.real
@@ -617,11 +617,11 @@
\begin{verbatim}
>>> word[0] = 'x'
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1, in ?
TypeError: object doesn't support item assignment
>>> word[:-1] = 'Splat'
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1, in ?
TypeError: object doesn't support slice assignment
\end{verbatim}
@@ -699,7 +699,7 @@
>>> word[-100:]
'HelpA'
>>> word[-10] # error
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1
IndexError: string index out of range
\end{verbatim}
@@ -767,24 +767,24 @@
\emph{Unicode-Escape} encoding. The following example shows how:
\begin{verbatim}
->>> u'Hello\u0020World !'
+>>> u'Hello\\u0020World !'
u'Hello World !'
\end{verbatim}
-The escape sequence \code{\e u0020} indicates to insert the Unicode
-character with the ordinal value 0x0020 (the space character) at the
+The escape sequence \code{\\u0020} indicates to insert the Unicode
+character with the HEX ordinal 0x0020 (the space character) at the
given position.
Other characters are interpreted by using their respective ordinal
-values directly as Unicode ordinals. If you have literal strings
-in the standard Latin-1 encoding that is used in many Western countries,
-you will find it convenient that the lower 256 characters
-of Unicode are the same as the 256 characters of Latin-1.
+value directly as Unicode ordinal. Due to the fact that the lower 256
+Unicode are the same as the standard Latin-1 encoding used in many
+western countries, the process of entering Unicode is greatly
+simplified.
-For experts, there is also a raw mode just like the one for normal
-strings. You have to prefix the opening quote with 'ur' to have
+For experts, there is also a raw mode just like for normal
+strings. You have to prepend the string with a small 'r' to have
Python use the \emph{Raw-Unicode-Escape} encoding. It will only apply
-the above \code{\e uXXXX} conversion if there is an uneven number of
+the above \code{\\uXXXX} conversion if there is an uneven number of
backslashes in front of the small 'u'.
\begin{verbatim}
@@ -801,50 +801,40 @@
other ways of creating Unicode strings on the basis of a known
encoding.
-The built-in function \function{unicode()}\bifuncindex{unicode} provides
-access to all registered Unicode codecs (COders and DECoders). Some of
-the more well known encodings which these codecs can convert are
-\emph{Latin-1}, \emph{ASCII}, \emph{UTF-8}, and \emph{UTF-16}.
-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
-with \function{str()}, conversion takes place using this default encoding.
-
-\begin{verbatim}
->>> u"abc"
-u'abc'
->>> str(u"abc")
-'abc'
+The builtin \function{unicode()}\bifuncindex{unicode} provides access
+to all registered Unicode codecs (COders and DECoders). Some of the
+more well known encodings which these codecs can convert are
+\emph{Latin-1}, \emph{ASCII}, \emph{UTF-8} and \emph{UTF-16}. The latter two
+are variable length encodings which permit to store Unicode characters
+in 8 or 16 bits. Python uses UTF-8 as default encoding. This becomes
+noticeable when printing Unicode strings or writing them to files.
+
+\begin{verbatim}
>>> u"äöü"
-u'\xe4\xf6\xfc'
+u'\344\366\374'
>>> str(u"äöü")
-Traceback (most recent call last):
- File "", line 1, in ?
-UnicodeError: ASCII encoding error: ordinal not in range(128)
+'\303\244\303\266\303\274'
\end{verbatim}
-To convert a Unicode string into an 8-bit string using a specific
-encoding, Unicode objects provide an \function{encode()} method
-that takes one argument, the name of the encoding. Lowercase names
-for encodings are preferred.
+If you have data in a specific encoding and want to produce a
+corresponding Unicode string from it, you can use the
+\function{unicode()} builtin with the encoding name as second
+argument.
\begin{verbatim}
->>> u"äöü".encode('utf-8')
-'\xc3\xa4\xc3\xb6\xc3\xbc'
+>>> unicode('\303\244\303\266\303\274','UTF-8')
+u'\344\366\374'
\end{verbatim}
-If you have data in a specific encoding and want to produce a
-corresponding Unicode string from it, you can use the
-\function{unicode()} function with the encoding name as the second
-argument.
+To convert the Unicode string back into a string using the original
+encoding, the objects provide an \method{encode()} method.
\begin{verbatim}
->>> unicode('\xc3\xa4\xc3\xb6\xc3\xbc', 'utf-8')
-u'\xe4\xf6\xfc'
+>>> u"äöü".encode('UTF-8')
+'\303\244\303\266\303\274'
\end{verbatim}
+
\subsection{Lists \label{lists}}
Python knows a number of \emph{compound} data types, used to group
@@ -1056,8 +1046,8 @@
\keyword{if} \ldots\ \keyword{elif} \ldots\ \keyword{elif} \ldots\ sequence
% Weird spacings happen here if the wrapping of the source text
% gets changed in the wrong way.
-is a substitute for the \keyword{switch} or
-\keyword{case} statements found in other languages.
+is a substitute for the \emph{switch} or
+\emph{case} statements found in other languages.
\section{\keyword{for} Statements \label{for}}
@@ -1296,8 +1286,9 @@
\item
The \keyword{return} statement returns with a value from a function.
-\keyword{return} without an expression argument returns \code{None}.
-Falling off the end of a procedure also returns \code{None}.
+\keyword{return} without an expression argument is used to return from
+the middle of a procedure (falling off the end also returns from a
+procedure), in which case the \code{None} value is returned.
\item
The statement \code{result.append(b)} calls a \emph{method} of the list
@@ -1432,7 +1423,7 @@
... pass
...
>>> function(0, a=0)
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1, in ?
TypeError: keyword parameter redefined
\end{verbatim}
@@ -1506,15 +1497,8 @@
overcome through the judicious use of default argument values, e.g.
\begin{verbatim}
->>> def make_incrementor(n):
-... return lambda x, incr=n: x+incr
-...
->>> f = make_incrementor(42)
->>> f(0)
-42
->>> f(1)
-43
->>>
+def make_incrementor(n):
+ return lambda x, incr=n: x+incr
\end{verbatim}
@@ -2032,7 +2016,7 @@
the lexicographical comparison is carried out recursively. If all
items of two sequences compare equal, the sequences are considered
equal. If one sequence is an initial subsequence of the other, the
-shorter sequence is the smaller one. Lexicographical ordering for
+shorted sequence is the smaller one. Lexicographical ordering for
strings uses the \ASCII{} ordering for individual characters. Some
examples of comparisons between sequences with the same types:
@@ -2597,7 +2581,7 @@
for padding strings to a given column width; these will be discussed
shortly. The second way is to use the \code{\%} operator with a
string as the left argument. The \code{\%} operator interprets the
-left argument much like a \cfunction{sprintf()}-style format
+left argument as a C much like a \cfunction{sprintf()}-style format
string to be applied to the right argument, and returns the string
resulting from this formatting operation.
@@ -2616,7 +2600,7 @@
... p = [x, y]
>>> ps = repr(p)
>>> ps
-'[31.400000000000002, 40000]'
+'[31.4, 40000]'
>>> # Converting a string adds string quotes and backslashes:
... hello = 'hello, world\n'
>>> hellos = `hello`
@@ -2624,7 +2608,7 @@
'hello, world\012'
>>> # The argument of reverse quotes may be a tuple:
... `x, y, ('spam', 'eggs')`
-"(31.400000000000002, 40000, ('spam', 'eggs'))"
+"(31.4, 40000, ('spam', 'eggs'))"
\end{verbatim}
Here are two ways to write a table of squares and cubes:
@@ -2852,7 +2836,7 @@
\begin{verbatim}
>>> f.close()
>>> f.read()
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1, in ?
ValueError: I/O operation on closed file
\end{verbatim}
@@ -2950,15 +2934,15 @@
\begin{verbatim}
>>> 10 * (1/0)
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1
ZeroDivisionError: integer division or modulo
>>> 4 + spam*3
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1
NameError: spam
>>> '2' + 2
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1
TypeError: illegal argument type for built-in operation
\end{verbatim}
@@ -2983,8 +2967,8 @@
In general it contains a stack backtrace listing source lines; however,
it will not display lines read from standard input.
-The \citetitle[../lib/module-exceptions.html]{Python Library
-Reference} lists the built-in exceptions and their meanings.
+The \emph{Python Library Reference} lists the built-in exceptions and
+their meanings.
\section{Handling Exceptions \label{handling}}
@@ -3133,7 +3117,7 @@
\begin{verbatim}
>>> raise NameError, 'HiThere'
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1
NameError: HiThere
\end{verbatim}
@@ -3162,7 +3146,7 @@
...
My exception occurred, value: 4
>>> raise MyError, 1
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 1
__main__.MyError: 1
\end{verbatim}
@@ -3187,7 +3171,7 @@
... print 'Goodbye, world!'
...
Goodbye, world!
-Traceback (most recent call last):
+Traceback (innermost last):
File "", line 2
KeyboardInterrupt
\end{verbatim}
Only in main/contrib/python-2.0/dist/src: Doc.BAK
diff -ru main/contrib/python-2.0/dist/src/LICENSE main/Apps/ActivePython-2.0/src/Core/LICENSE
--- main/contrib/python-2.0/dist/src/LICENSE Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/LICENSE Mon Mar 12 16:10:19 2001
@@ -14,10 +14,16 @@
release from PythonLabs. Thanks to the many outside volunteers who
have worked under Guido's direction to make this release possible.
+ActivePython Community License (version 2)
+Preamble:
-BEOPEN.COM TERMS AND CONDITIONS FOR PYTHON 2.0
-==============================================
+The intent of this document is to state the conditions under which the Package
+may be copied and distributed, such that ActiveState maintains control over the
+development and distribution of the Package, while allowing the users of the
+Package to use the Package in a variety of ways.
+
+The Package may contain software covered by other licenses:
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
-----------------------------------------------------
@@ -162,3 +168,40 @@
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Definitions:
+
+"ActiveState" refers to ActiveState Tool Corp., the Copyright Holder of the
+Package.
+
+"Package" refers to those files, including, but not limited to, source code,
+binary executables, images, and scripts, which are distributed by the Copyright
+Holder.
+
+"You" is you, if you are thinking about copying or distributing this Package.
+
+1. You may use this Package for commercial or non-commercial purposes without
+ charge.
+
+2. You may make and give away verbatim copies of this Package for personal use,
+ or for use within your organization, provided that you duplicate all of the
+ original copyright notices and associated disclaimers. You may not
+ distribute copies of this Package, or copies of packages derived from this
+ Package, to others outside your organization without specific prior written
+ permission from ActiveState (although you are encouraged to direct them to
+ sources from which they may obtain it for themselves).
+
+3. You may apply bug fixes, portability fixes, and other modifications derived
+ from ActiveState. A Package modified in such a way shall still be covered by
+ the terms of this license.
+
+4. ActiveState's name and trademarks may not be used to endorse or promote
+ packages derived from this Package without specific prior written permission
+ from ActiveState.
+
+5. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+ActiveState Community License Copyright (c) 2000-2001
+ActiveState Tool Corp. All rights reserved.
diff -ru main/contrib/python-2.0/dist/src/Lib/distutils/command/build_ext.py main/Apps/ActivePython-2.0/src/Core/Lib/distutils/command/build_ext.py
--- main/contrib/python-2.0/dist/src/Lib/distutils/command/build_ext.py Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Lib/distutils/command/build_ext.py Mon Mar 12 16:10:19 2001
@@ -368,8 +368,12 @@
base = modpath[-1]
build_py = self.get_finalized_command('build_py')
- package_dir = build_py.get_package_dir(package)
- ext_filename = os.path.join(package_dir,
+ package_dirs = build_py.get_package_dir(package)
+ # CHANGE:
+ # put the extensions in the first package directory
+ # along with the rest of the Python modules
+ # Modified by Houman Ghaemi
+ ext_filename = os.path.join(package_dirs[0],
self.get_ext_filename(base))
else:
ext_filename = os.path.join(self.build_lib,
diff -ru main/contrib/python-2.0/dist/src/Lib/distutils/command/build_py.py main/Apps/ActivePython-2.0/src/Core/Lib/distutils/command/build_py.py
--- main/contrib/python-2.0/dist/src/Lib/distutils/command/build_py.py Mon Mar 12 16:11:29 2001
+++ main/Apps/ActivePython-2.0/src/Core/Lib/distutils/command/build_py.py Mon Mar 12 16:10:19 2001
@@ -117,9 +117,9 @@
if not self.package_dir:
if path:
- return apply(os.path.join, path)
+ return [apply(os.path.join, path)]
else:
- return ''
+ return ['']
else:
tail = []
while path:
@@ -129,59 +129,77 @@
tail.insert(0, path[-1])
del path[-1]
else:
+ if type(pdir) is ListType:
+ tail.insert(0, pdir[0])
+ FinalPath = [apply(os.path.join, tail)]+pdir[1:]
+ return FinalPath
+ else:
+ tail.insert(0, pdir)
+ return [apply(os.path.join, tail)]
+
+ # Oops, got all the way through 'path' without finding a
+ # match in package_dir. If package_dir defines a directory
+ # for the root (nameless) package, then fallback on it;
+ # otherwise, we might as well have not consulted
+ # package_dir at all, as we just use the directory implied
+ # by 'tail' (which should be the same as the original value
+ # of 'path' at this point).
+ pdir = self.package_dir.get('')
+ if pdir is not None:
+ if type(pdir) is ListType:
+ tail.insert(0, pdir[0])
+ FinalPath = [apply(os.path.join, tail)]+pdir[1:]
+ return FinalPath
+ else:
tail.insert(0, pdir)
- return apply(os.path.join, tail)
+ return [apply(os.path.join, tail)]
else:
- # Oops, got all the way through 'path' without finding a
- # match in package_dir. If package_dir defines a directory
- # for the root (nameless) package, then fallback on it;
- # otherwise, we might as well have not consulted
- # package_dir at all, as we just use the directory implied
- # by 'tail' (which should be the same as the original value
- # of 'path' at this point).
- pdir = self.package_dir.get('')
- if pdir is not None:
- tail.insert(0, pdir)
-
if tail:
- return apply(os.path.join, tail)
+ return [apply(os.path.join, tail)]
else:
- return ''
+ return ['']
# get_package_dir ()
- def check_package (self, package, package_dir):
+ def check_package (self, package, package_dirs):
# Empty dir name means current directory, which we can probably
# assume exists. Also, os.path.exists and isdir don't know about
# my "empty string means current dir" convention, so we have to
# circumvent them.
- if package_dir != "":
- if not os.path.exists(package_dir):
- raise DistutilsFileError, \
- "package directory '%s' does not exist" % package_dir
- if not os.path.isdir(package_dir):
- raise DistutilsFileError, \
- ("supposed package directory '%s' exists, " +
- "but is not a directory") % package_dir
+ if type(package_dirs) is ListType:
+ for package_dir in package_dirs:
+ if package_dir != "":
+ if not os.path.exists(package_dir):
+ raise DistutilsFileError, \
+ "package directory '%s' does not exist" % package_dir
+ if not os.path.isdir(package_dir):
+ raise DistutilsFileError, \
+ ("supposed package directory '%s' exists, " +
+ "but is not a directory") % package_dir
# Require __init__.py for all but the "root package"
+ # Changes:
+ # an assumption is made that __init__.py is in the first
+ # directory in the array of directories, i.e., package_dirs.
+ # Modified on Jan 12,2001 by Houman Ghaemi
if package:
- init_py = os.path.join(package_dir, "__init__.py")
- if os.path.isfile(init_py):
- return init_py
- else:
- self.warn(("package init file '%s' not found " +
- "(or not a regular file)") % init_py)
-
+ if type(package_dirs) is ListType:
+ init_py = os.path.join(package_dirs[0], "__init__.py")
+ else:
+ init_py = os.path.join(package_dirs, "__init__.py")
+ if os.path.isfile(init_py):
+ return init_py
+ else:
+ self.warn(("package init file '%s' not found " +
+ "(or not a regular file)") % init_py)
# Either not in a package at all (__init__.py not expected), or
# __init__.py doesn't exist -- so don't return the filename.
return
# check_package ()
-
def check_module (self, module, module_file):
if not os.path.isfile(module_file):
self.warn("file %s (for module %s) not found" %
@@ -192,7 +210,6 @@
# check_module ()
-
def find_package_modules (self, package, package_dir):
self.check_package(package, package_dir)
module_files = glob(os.path.join(package_dir, "*.py"))
@@ -241,25 +258,29 @@
module_base = path[-1]
try:
- (package_dir, checked) = packages[package]
+ (package_dirs, checked) = packages[package]
except KeyError:
- package_dir = self.get_package_dir(package)
+ package_dirs = self.get_package_dir(package)
checked = 0
if not checked:
- init_py = self.check_package(package, package_dir)
- packages[package] = (package_dir, 1)
+ init_py = self.check_package(package, package_dirs)
+ packages[package] = (package_dirs, 1)
if init_py:
modules.append((package, "__init__", init_py))
# XXX perhaps we should also check for just .pyc files
# (so greedy closed-source bastards can distribute Python
# modules too)
- module_file = os.path.join(package_dir, module_base + ".py")
- if not self.check_module(module, module_file):
- continue
-
- modules.append((package, module_base, module_file))
+ for package_dir in package_dirs:
+ module_file = os.path.join(package_dir, module_base + ".py")
+ if self.check_module(module, module_file):
+ modules.append((package, module_base, module_file))
+ # there you go...this one for the greedy bastards (swear to
+ # god I do not have a closed source one myself)
+ module_file = os.path.join(package_dir, module_base + ".pyc")
+ if self.check_module(module, module_file):
+ modules.append((package, module_base, module_file))
return modules
@@ -278,9 +299,10 @@
else:
modules = []
for package in self.packages:
- package_dir = self.get_package_dir(package)
- m = self.find_package_modules(package, package_dir)
- modules.extend(m)
+ package_dirs = self.get_package_dir(package)
+ for package_dir in package_dirs:
+ m = self.find_package_modules(package, package_dir)
+ modules.extend(m)
return modules
@@ -288,7 +310,6 @@
def get_source_files (self):
-
modules = self.find_all_modules()
filenames = []
for module in modules:
@@ -361,14 +382,15 @@
# already know its package!), and 'module_file' is the path to
# the .py file, relative to the current directory
# (ie. including 'package_dir').
- package_dir = self.get_package_dir(package)
- modules = self.find_package_modules(package, package_dir)
-
- # Now loop over the modules we found, "building" each one (just
- # copy it to self.build_lib).
- for (package_, module, module_file) in modules:
- assert package == package_
- self.build_module(module, module_file, package)
+ package_dirs = self.get_package_dir(package)
+ for dir in package_dirs:
+ modules = self.find_package_modules(package, dir)
+
+ # Now loop over the modules we found, "building" each one (just
+ # copy it to self.build_lib).
+ for (package_, module, module_file) in modules:
+ assert package == package_
+ self.build_module(module, module_file, package)
# build_packages ()
@@ -395,3 +417,14 @@
verbose=self.verbose, dry_run=self.dry_run)
# class build_py
+
+
+
+
+
+
+
+
+
+
+
diff -ru main/contrib/python-2.0/dist/src/Lib/filecmp.py main/Apps/ActivePython-2.0/src/Core/Lib/filecmp.py
--- main/contrib/python-2.0/dist/src/Lib/filecmp.py Mon Mar 12 16:11:31 2001
+++ main/Apps/ActivePython-2.0/src/Core/Lib/filecmp.py Mon Mar 12 16:10:20 2001
@@ -295,9 +295,12 @@
# 1 for different
# 2 for funny cases (can't stat, etc.)
#
-def _cmp(a, b):
+# ActivePython build 203 fixes this bug...code is ported from Python
+# 2.1 . Bug report is here:
+# http://activepythonbugs.activestate.com/roundup.cgi/UNSORTED6
+def _cmp(a, b, sh, st):
try:
- return not abs(cmp(a, b))
+ return not abs(cmp(a, b, sh, st))
except os.error:
return 2
diff -ru main/contrib/python-2.0/dist/src/Lib/site.py main/Apps/ActivePython-2.0/src/Core/Lib/site.py
--- main/contrib/python-2.0/dist/src/Lib/site.py Mon Mar 12 16:11:32 2001
+++ main/Apps/ActivePython-2.0/src/Core/Lib/site.py Mon Mar 12 16:10:20 2001
@@ -202,10 +202,11 @@
__builtin__.copyright = _Printer("copyright", sys.copyright)
__builtin__.credits = _Printer("credits",
- "Python development is led by BeOpen PythonLabs (www.pythonlabs.com).")
+ "ActivePython is a Python distribution by ActiveState Tool Corp.\n Python development is led by BeOpen PythonLabs (www.pythonlabs.com).")
here = os.path.dirname(os.__file__)
__builtin__.license = _Printer(
- "license", "See http://www.pythonlabs.com/products/python2.0/license.html",
+ "license",
+ "See http://www.activestate.com/Products/ActivePython/License_Agreement.html",
["LICENSE.txt", "LICENSE"],
[here, os.path.join(here, os.pardir), os.curdir])
diff -ru main/contrib/python-2.0/dist/src/Lib/test/test_import.py main/Apps/ActivePython-2.0/src/Core/Lib/test/test_import.py
--- main/contrib/python-2.0/dist/src/Lib/test/test_import.py Mon Mar 12 16:11:32 2001
+++ main/Apps/ActivePython-2.0/src/Core/Lib/test/test_import.py Mon Mar 12 16:10:21 2001
@@ -15,6 +15,11 @@
print >> f, "b =", b
f.close()
+# have to ensure that the directory in which TESTFN.py is created
+# is on sys.path for the __import__ call
+import sys
+sys.path.append(os.path.dirname(os.curdir))
+
try:
try:
mod = __import__(TESTFN)
diff -ru main/contrib/python-2.0/dist/src/Lib/test/test_mailbox.py main/Apps/ActivePython-2.0/src/Core/Lib/test/test_mailbox.py
--- main/contrib/python-2.0/dist/src/Lib/test/test_mailbox.py Mon Mar 12 16:11:32 2001
+++ main/Apps/ActivePython-2.0/src/Core/Lib/test/test_mailbox.py Mon Mar 12 16:10:21 2001
@@ -2,18 +2,20 @@
import os
import test_support
+test_support.TESTDN = "@testdir"
+
# create a new maildir mailbox to work with:
-curdir = os.path.join(test_support.TESTFN, "cur")
-newdir = os.path.join(test_support.TESTFN, "new")
+curdir = os.path.join(test_support.TESTDN, "cur")
+newdir = os.path.join(test_support.TESTDN, "new")
try:
- os.mkdir(test_support.TESTFN)
+ os.mkdir(test_support.TESTDN)
os.mkdir(curdir)
os.mkdir(newdir)
# Test for regression on bug #117490:
# http://sourceforge.net/bugs/?func=detailbug&bug_id=117490&group_id=5470
# Make sure the boxes attribute actually gets set.
- mbox = mailbox.Maildir(test_support.TESTFN)
+ mbox = mailbox.Maildir(test_support.TESTDN)
mbox.boxes
print "newly created maildir contains", len(mbox.boxes), "messages"
@@ -24,5 +26,5 @@
except IOError: pass
try: os.rmdir(curdir)
except IOError: pass
- try: os.rmdir(test_support.TESTFN)
+ try: os.rmdir(test_support.TESTDN)
except IOError: pass
diff -ru main/contrib/python-2.0/dist/src/Makefile.in main/Apps/ActivePython-2.0/src/Core/Makefile.in
--- main/contrib/python-2.0/dist/src/Makefile.in Mon Mar 12 16:11:33 2001
+++ main/Apps/ActivePython-2.0/src/Core/Makefile.in Mon Mar 12 16:10:21 2001
@@ -102,6 +102,7 @@
INSTALL= @srcdir@/install-sh -c
INSTALL_PROGRAM=${INSTALL} -m $(EXEMODE)
INSTALL_DATA= ${INSTALL} -m $(FILEMODE)
+INSTALL_DIR_RECURSIVE= ./python$(EXE) install-dir-recursive.py $(DIRMODE) $(EXEMODE) $(FILEMODE)
# Use this to make a link between python$(VERSION) and python in $(BINDIR)
LN=@LN@
@@ -217,7 +218,7 @@
PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
# Install everything
-install: altinstall bininstall maninstall
+install: altinstall bininstall maninstall toolsinstall
# Install almost everything without disturbing previous versions
altinstall: altbininstall libinstall inclinstall libainstall sharedinstall
@@ -237,7 +238,7 @@
do \
if test ! -d $$i; then \
echo "Creating directory $$i"; \
- mkdir $$i; \
+ mkdir -p $$i; \
chmod $(DIRMODE) $$i; \
else true; \
fi; \
@@ -261,6 +262,12 @@
done
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
$(MANDIR)/man1/python.1
+
+toolsinstall: python$(EXE)
+ # should use INSTALL_DATA and INSTALL_PROGRAM as appropriate
+ # to get the proper installation premissions
+ PYTHONPATH=$(LIBDEST) \
+ $(INSTALL_DIR_RECURSIVE) Tools $(exec_prefix)/Tools
# Install the library
PLATDIR= plat-$(MACHDEP)
Only in main/Apps/ActivePython-2.0/src/Core/Modules: Setup.in.checkpoint
Only in main/Apps/ActivePython-2.0/src/Core/Modules: Setup.in.linux
Only in main/Apps/ActivePython-2.0/src/Core/Modules: Setup.in.solaris
diff -ru main/contrib/python-2.0/dist/src/Modules/main.c main/Apps/ActivePython-2.0/src/Core/Modules/main.c
--- main/contrib/python-2.0/dist/src/Modules/main.c Mon Mar 12 16:11:34 2001
+++ main/Apps/ActivePython-2.0/src/Core/Modules/main.c Mon Mar 12 16:10:21 2001
@@ -248,7 +248,7 @@
if (Py_VerboseFlag ||
(command == NULL && filename == NULL && stdin_is_interactive))
- fprintf(stderr, "Python %s on %s\n%s\n",
+ fprintf(stderr, "ActivePython 2.0, build 203 (ActiveState Tool Corp.)\nbased on Python %s on %s\n%s\n",
Py_GetVersion(), Py_GetPlatform(), COPYRIGHT);
diff -ru main/contrib/python-2.0/dist/src/PC/python_nt.rc main/Apps/ActivePython-2.0/src/Core/PC/python_nt.rc
--- main/contrib/python-2.0/dist/src/PC/python_nt.rc Mon Mar 12 16:11:35 2001
+++ main/Apps/ActivePython-2.0/src/Core/PC/python_nt.rc Mon Mar 12 16:10:22 2001
@@ -28,8 +28,8 @@
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,6,0,0
- PRODUCTVERSION 1,6,0,0
+ FILEVERSION 2,0,0,203
+ PRODUCTVERSION 2,0,0,203
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -44,11 +44,11 @@
BEGIN
BLOCK "000004b0"
BEGIN
- VALUE "CompanyName", "BeOpen.com\0"
+ VALUE "CompanyName", "ActiveState Tool Corp.\0"
VALUE "FileDescription", "Python Core\0"
VALUE "FileVersion", PYTHON_VERSION
VALUE "InternalName", "Python DLL\0"
- VALUE "LegalCopyright", "Copyright (c) 2000 BeOpen.com. Copyright (c) 1995-2000 CNRI. Copyright (c) 1990-1995 SMC.\0"
+ VALUE "LegalCopyright", "Copyright (c) 2000-2001 ActiveState Tool Corp. Copyright (c) 2000 BeOpen.com. Copyright (c) 1995-2000 CNRI. Copyright (c) 1990-1995 SMC.\0"
VALUE "OriginalFilename", PYTHON_DLL_NAME "\0"
VALUE "ProductName", "Python\0"
VALUE "ProductVersion", PYTHON_VERSION
diff -ru main/contrib/python-2.0/dist/src/PCbuild/_tkinter.dsp main/Apps/ActivePython-2.0/src/Core/PCbuild/_tkinter.dsp
--- main/contrib/python-2.0/dist/src/PCbuild/_tkinter.dsp Mon Mar 12 16:11:35 2001
+++ main/Apps/ActivePython-2.0/src/Core/PCbuild/_tkinter.dsp Mon Mar 12 16:10:22 2001
@@ -58,7 +58,7 @@
LINK32=link.exe
# ADD BASE LINK32 tcl80.lib tk80.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:ALPHA /out:"./_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 ..\..\tcl\lib\tcl83.lib ..\..\tcl\lib\tk83.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:ALPHA /out:"alpha-temp-debug/_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
+# ADD LINK32 ..\..\tcl\win\Debug\tcl83.lib ..\..\tk\win\Debug\tk83.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:ALPHA /out:"alpha-temp-debug/_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "_tkinter - Win32 Alpha Release"
@@ -77,7 +77,7 @@
# PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MT /Gt0 /W3 /GX /Zi /O2 /I "..\Include" /I "..\PC" /I "C:\Program Files\Tcl\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
-# ADD CPP /nologo /MD /Gt0 /W3 /GX /O2 /I "..\Include" /I "..\PC" /I "..\..\Tcl\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
+# ADD CPP /nologo /MD /Gt0 /W3 /GX /O2 /I "..\Include" /I "..\PC" /I "..\..\Tk\xlib" /I "..\..\Tk\generic" /I "..\..\Tcl\generic" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
@@ -90,7 +90,7 @@
LINK32=link.exe
# ADD BASE LINK32 tcl80.lib tk80.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:ALPHA /out:"./_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
# SUBTRACT BASE LINK32 /pdb:none
-# ADD LINK32 ..\..\tcl\lib\tcl83.lib ..\..\tcl\lib\tk83.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:ALPHA /out:"alpha-temp-release/_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
+# ADD LINK32 ..\..\tcl\win\Release\tcl83.lib ..\..\tk\win\Release\tk83.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib wsock32.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:ALPHA /out:"alpha-temp-release/_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "_tkinter - Win32 Debug"
@@ -109,7 +109,7 @@
F90=df.exe
CPP=cl.exe
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\tcl\include" /I "..\Include" /I "..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\Tk\xlib" /I "..\..\Tk\xlib" /I "..\..\Tk\generic" /I "..\..\tcl\generic" /I "..\Include" /I "..\PC" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
@@ -121,7 +121,7 @@
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\tcl\lib\tk83.lib ..\..\tcl\lib\tcl83.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
+# ADD LINK32 ..\..\tk\win\Debug\tk83.lib ..\..\tcl\win\Debug\tcl83.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter_d.pyd" /pdbtype:sept /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "_tkinter - Win32 Release"
@@ -140,7 +140,7 @@
F90=df.exe
CPP=cl.exe
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\tcl\include" /I "..\Include" /I "..\PC" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\tk\xlib" /I "..\..\tk\generic" /I "..\..\tcl\generic" /I "..\Include" /I "..\PC" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "WITH_APPINIT" /YX /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
@@ -152,7 +152,7 @@
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
-# ADD LINK32 ..\..\tcl\lib\tk83.lib ..\..\tcl\lib\tcl83.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
+# ADD LINK32 ..\..\tk\win\Release\tk83.lib ..\..\tcl\win\Release\tcl83.lib odbc32.lib odbccp32.lib user32.lib kernel32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e190000" /subsystem:windows /dll /debug /machine:I386 /out:"./_tkinter.pyd" /libpath:"C:\Program Files\Tcl\lib" /export:init_tkinter
# SUBTRACT LINK32 /pdb:none
!ENDIF
diff -ru main/contrib/python-2.0/dist/src/Python/getcopyright.c main/Apps/ActivePython-2.0/src/Core/Python/getcopyright.c
--- main/contrib/python-2.0/dist/src/Python/getcopyright.c Mon Mar 12 16:11:35 2001
+++ main/Apps/ActivePython-2.0/src/Core/Python/getcopyright.c Mon Mar 12 16:10:23 2001
@@ -3,7 +3,9 @@
#include "Python.h"
static char cprt[] =
-"Copyright (c) 2000 BeOpen.com.\n\
+"Copyright (c) 2000 ActiveState Tool Corp.\n\
+\n\
+Copyright (c) 2000 BeOpen.com.\n\
All Rights Reserved.\n\
\n\
Copyright (c) 1995-2000 Corporation for National Research Initiatives.\n\
diff -ru main/contrib/python-2.0/dist/src/configure main/Apps/ActivePython-2.0/src/Core/configure
--- main/contrib/python-2.0/dist/src/configure Mon Mar 12 16:11:37 2001
+++ main/Apps/ActivePython-2.0/src/Core/configure Mon Mar 12 16:10:24 2001
@@ -1,6 +1,6 @@
#! /bin/sh
-# From configure.in Revision: 1.172
+# From configure.in Revision: 1.173
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
@@ -2727,7 +2727,7 @@
hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
- Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*) LINKFORSHARED="-Xlinker -export-dynamic -Xlinker -rpath -Xlinker /usr/local/lib";;
# -u libsys_s pulls in all symbols in libsys
next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
# -u __dummy makes the linker aware of the objc runtime
@@ -2741,13 +2741,13 @@
FreeBSD*|NetBSD*)
if [ "`$CC -dM -E - &1 | grep BFD >/dev/null
then
- LINKFORSHARED="-Xlinker --export-dynamic"
+ LINKFORSHARED="-Xlinker --export-dynamic -Xlinker -rpath -Xlinker /usr/local/lib"
fi;;
esac;;
esac
diff -ru main/contrib/python-2.0/dist/src/configure.in main/Apps/ActivePython-2.0/src/Core/configure.in
--- main/contrib/python-2.0/dist/src/configure.in Mon Mar 12 16:11:37 2001
+++ main/Apps/ActivePython-2.0/src/Core/configure.in Mon Mar 12 16:10:24 2001
@@ -639,7 +639,7 @@
hp*|HP*)
LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
- Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ Linux*) LINKFORSHARED="-Xlinker -export-dynamic -Xlinker -rpath -Xlinker /usr/local/lib";;
# -u libsys_s pulls in all symbols in libsys
next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
# -u __dummy makes the linker aware of the objc runtime
@@ -653,13 +653,13 @@
FreeBSD*|NetBSD*)
if [[ "`$CC -dM -E - &1 | grep BFD >/dev/null
then
- LINKFORSHARED="-Xlinker --export-dynamic"
+ LINKFORSHARED="-Xlinker --export-dynamic -Xlinker -rpath -Xlinker /usr/local/lib"
fi;;
esac;;
esac
Only in main/Apps/ActivePython-2.0/src/Core: install-dir-recursive.py