python-old-doctools-2.5.5/0000755000175000017500000000000011331607730014117 5ustar dokodokopython-old-doctools-2.5.5/Doc/0000755000175000017500000000000011325610014014614 5ustar dokodokopython-old-doctools-2.5.5/Doc/commontex/0000755000175000017500000000000011301317322016625 5ustar dokodokopython-old-doctools-2.5.5/Doc/commontex/typestruct.h0000644000175000017500000000403207735234025021241 0ustar dokodokotypedef struct _typeobject { PyObject_VAR_HEAD char *tp_name; /* For printing, in format "." */ int tp_basicsize, tp_itemsize; /* For allocation */ /* Methods to implement standard operations */ destructor tp_dealloc; printfunc tp_print; getattrfunc tp_getattr; setattrfunc tp_setattr; cmpfunc tp_compare; reprfunc tp_repr; /* Method suites for standard classes */ PyNumberMethods *tp_as_number; PySequenceMethods *tp_as_sequence; PyMappingMethods *tp_as_mapping; /* More standard operations (here for binary compatibility) */ hashfunc tp_hash; ternaryfunc tp_call; reprfunc tp_str; getattrofunc tp_getattro; setattrofunc tp_setattro; /* Functions to access object as input/output buffer */ PyBufferProcs *tp_as_buffer; /* Flags to define presence of optional/expanded features */ long tp_flags; char *tp_doc; /* Documentation string */ /* Assigned meaning in release 2.0 */ /* call function for all accessible objects */ traverseproc tp_traverse; /* delete references to contained objects */ inquiry tp_clear; /* Assigned meaning in release 2.1 */ /* rich comparisons */ richcmpfunc tp_richcompare; /* weak reference enabler */ long tp_weaklistoffset; /* Added in release 2.2 */ /* Iterators */ getiterfunc tp_iter; iternextfunc tp_iternext; /* Attribute descriptor and subclassing stuff */ struct PyMethodDef *tp_methods; struct PyMemberDef *tp_members; struct PyGetSetDef *tp_getset; struct _typeobject *tp_base; PyObject *tp_dict; descrgetfunc tp_descr_get; descrsetfunc tp_descr_set; long tp_dictoffset; initproc tp_init; allocfunc tp_alloc; newfunc tp_new; freefunc tp_free; /* Low-level free-memory routine */ inquiry tp_is_gc; /* For PyObject_IS_GC */ PyObject *tp_bases; PyObject *tp_mro; /* method resolution order */ PyObject *tp_cache; PyObject *tp_subclasses; PyObject *tp_weaklist; } PyTypeObject; python-old-doctools-2.5.5/Doc/commontex/license.tex0000644000175000017500000007256610757263104021025 0ustar dokodoko\section{History of the software} Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum (CWI, see \url{http://www.cwi.nl/}) in the Netherlands as a successor of a language called ABC. Guido remains Python's principal author, although it includes many contributions from others. In 1995, Guido continued his work on Python at the Corporation for National Research Initiatives (CNRI, see \url{http://www.cnri.reston.va.us/}) in Reston, Virginia where he released several versions of the software. In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same year, the PythonLabs team moved to Digital Creations (now Zope Corporation; see \url{http://www.zope.com/}). In 2001, the Python Software Foundation (PSF, see \url{http://www.python.org/psf/}) was formed, a non-profit organization created specifically to own Python-related Intellectual Property. Zope Corporation is a sponsoring member of the PSF. All Python releases are Open Source (see \url{http://www.opensource.org/} for the Open Source Definition). Historically, most, but not all, Python releases have also been GPL-compatible; the table below summarizes the various releases. \begin{tablev}{c|c|c|c|c}{textrm}% {Release}{Derived from}{Year}{Owner}{GPL compatible?} \linev{0.9.0 thru 1.2}{n/a}{1991-1995}{CWI}{yes} \linev{1.3 thru 1.5.2}{1.2}{1995-1999}{CNRI}{yes} \linev{1.6}{1.5.2}{2000}{CNRI}{no} \linev{2.0}{1.6}{2000}{BeOpen.com}{no} \linev{1.6.1}{1.6}{2001}{CNRI}{no} \linev{2.1}{2.0+1.6.1}{2001}{PSF}{no} \linev{2.0.1}{2.0+1.6.1}{2001}{PSF}{yes} \linev{2.1.1}{2.1+2.0.1}{2001}{PSF}{yes} \linev{2.2}{2.1.1}{2001}{PSF}{yes} \linev{2.1.2}{2.1.1}{2002}{PSF}{yes} \linev{2.1.3}{2.1.2}{2002}{PSF}{yes} \linev{2.2.1}{2.2}{2002}{PSF}{yes} \linev{2.2.2}{2.2.1}{2002}{PSF}{yes} \linev{2.2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3}{2.2.2}{2002-2003}{PSF}{yes} \linev{2.3.1}{2.3}{2002-2003}{PSF}{yes} \linev{2.3.2}{2.3.1}{2003}{PSF}{yes} \linev{2.3.3}{2.3.2}{2003}{PSF}{yes} \linev{2.3.4}{2.3.3}{2004}{PSF}{yes} \linev{2.3.5}{2.3.4}{2005}{PSF}{yes} \linev{2.4}{2.3}{2004}{PSF}{yes} \linev{2.4.1}{2.4}{2005}{PSF}{yes} \linev{2.4.2}{2.4.1}{2005}{PSF}{yes} \linev{2.4.3}{2.4.2}{2006}{PSF}{yes} \linev{2.4.4}{2.4.3}{2006}{PSF}{yes} \linev{2.5}{2.4}{2006}{PSF}{yes} \linev{2.5.1}{2.5}{2007}{PSF}{yes} \linev{2.5.2}{2.5.1}{2008}{PSF}{yes} \end{tablev} \note{GPL-compatible doesn't mean that we're distributing Python under the GPL. All Python licenses, unlike the GPL, let you distribute a modified version without making your changes open source. The GPL-compatible licenses make it possible to combine Python with other software that is released under the GPL; the others don't.} Thanks to the many outside volunteers who have worked under Guido's direction to make these releases possible. \section{Terms and conditions for accessing or otherwise using Python} \centerline{\strong{PSF LICENSE AGREEMENT FOR PYTHON \version}} \begin{enumerate} \item This LICENSE AGREEMENT is between the Python Software Foundation (``PSF''), and the Individual or Organization (``Licensee'') accessing and otherwise using Python \version{} software in source or binary form and its associated documentation. \item Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python \version{} alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., ``Copyright \copyright{} 2001-2008 Python Software Foundation; All Rights Reserved'' are retained in Python \version{} alone or in any derivative version prepared by Licensee. \item In the event Licensee prepares a derivative work that is based on or incorporates Python \version{} or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python \version. \item PSF is making Python \version{} available to Licensee on an ``AS IS'' basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON \version{} WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON \version{} FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON \version, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. \item By copying, installing or otherwise using Python \version, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{\strong{BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0}} \centerline{\strong{BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1}} \begin{enumerate} \item This LICENSE AGREEMENT is between BeOpen.com (``BeOpen''), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization (``Licensee'') accessing and otherwise using this software in source or binary form and its associated documentation (``the Software''). \item Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. \item BeOpen is making the Software available to Licensee on an ``AS IS'' basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the ``BeOpen Python'' logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. \item By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{\strong{CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1}} \begin{enumerate} \item This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 (``CNRI''), and the Individual or Organization (``Licensee'') accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. \item Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., ``Copyright \copyright{} 1995-2001 Corporation for National Research Initiatives; All Rights Reserved'' are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): ``Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: \url{http://hdl.handle.net/1895.22/1013}.'' \item In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. \item CNRI is making Python 1.6.1 available to Licensee on an ``AS IS'' basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. \item CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. \item This License Agreement will automatically terminate upon a material breach of its terms and conditions. \item This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. \item By clicking on the ``ACCEPT'' button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. \end{enumerate} \centerline{ACCEPT} \centerline{\strong{CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2}} Copyright \copyright{} 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. \section{Licenses and Acknowledgements for Incorporated Software} This section is an incomplete, but growing list of licenses and acknowledgements for third-party software incorporated in the Python distribution. \subsection{Mersenne Twister} The \module{_random} module includes code based on a download from \url{http://www.math.keio.ac.jp/~matumoto/MT2002/emt19937ar.html}. The following are the verbatim comments from the original code: \begin{verbatim} A C-program for MT19937, with initialization improved 2002/1/26. Coded by Takuji Nishimura and Makoto Matsumoto. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Any feedback is very welcome. http://www.math.keio.ac.jp/matumoto/emt.html email: matumoto@math.keio.ac.jp \end{verbatim} \subsection{Sockets} The \module{socket} module uses the functions, \function{getaddrinfo}, and \function{getnameinfo}, which are coded in separate source files from the WIDE Project, \url{http://www.wide.ad.jp/about/index.html}. \begin{verbatim} Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND GAI_ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE FOR GAI_ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON GAI_ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN GAI_ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \end{verbatim} \subsection{Floating point exception control} The source for the \module{fpectl} module includes the following notice: \begin{verbatim} --------------------------------------------------------------------- / Copyright (c) 1996. \ | The Regents of the University of California. | | All rights reserved. | | | | Permission to use, copy, modify, and distribute this software for | | any purpose without fee is hereby granted, provided that this en- | | tire notice is included in all copies of any software which is or | | includes a copy or modification of this software and in all | | copies of the supporting documentation for such software. | | | | This work was produced at the University of California, Lawrence | | Livermore National Laboratory under contract no. W-7405-ENG-48 | | between the U.S. Department of Energy and The Regents of the | | University of California for the operation of UC LLNL. | | | | DISCLAIMER | | | | This software was prepared as an account of work sponsored by an | | agency of the United States Government. Neither the United States | | Government nor the University of California nor any of their em- | | ployees, makes any warranty, express or implied, or assumes any | | liability or responsibility for the accuracy, completeness, or | | usefulness of any information, apparatus, product, or process | | disclosed, or represents that its use would not infringe | | privately-owned rights. Reference herein to any specific commer- | | cial products, process, or service by trade name, trademark, | | manufacturer, or otherwise, does not necessarily constitute or | | imply its endorsement, recommendation, or favoring by the United | | States Government or the University of California. The views and | | opinions of authors expressed herein do not necessarily state or | | reflect those of the United States Government or the University | | of California, and shall not be used for advertising or product | \ endorsement purposes. / --------------------------------------------------------------------- \end{verbatim} \subsection{MD5 message digest algorithm} The source code for the \module{md5} module contains the following notice: \begin{verbatim} Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.h is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Removed support for non-ANSI compilers; removed references to Ghostscript; clarified derivation from RFC 1321; now handles byte order either statically or dynamically. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke . 1999-05-03 lpd Original version. \end{verbatim} \subsection{Asynchronous socket services} The \module{asynchat} and \module{asyncore} modules contain the following notice: \begin{verbatim} Copyright 1996 by Sam Rushing All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Sam Rushing not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. SAM RUSHING DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SAM RUSHING BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. \end{verbatim} \subsection{Cookie management} The \module{Cookie} module contains the following notice: \begin{verbatim} Copyright 2000 by Timothy O'Malley All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Timothy O'Malley not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Timothy O'Malley DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Timothy O'Malley BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. \end{verbatim} \subsection{Profiling} The \module{profile} and \module{pstats} modules contain the following notice: \begin{verbatim} Copyright 1994, by InfoSeek Corporation, all rights reserved. Written by James Roskind Permission to use, copy, modify, and distribute this Python software and its associated documentation for any purpose (subject to the restriction in the following sentence) without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of InfoSeek not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. This permission is explicitly restricted to the copying and modification of the software to remain in Python, compiled Python, or other languages (such as C) wherein the modified or derived code is exclusively imported into a Python module. INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. \end{verbatim} \subsection{Execution tracing} The \module{trace} module contains the following notice: \begin{verbatim} portions copyright 2001, Autonomous Zones Industries, Inc., all rights... err... reserved and offered to the public under the terms of the Python 2.2 license. Author: Zooko O'Whielacronx http://zooko.com/ mailto:zooko@zooko.com Copyright 2000, Mojam Media, Inc., all rights reserved. Author: Skip Montanaro Copyright 1999, Bioreason, Inc., all rights reserved. Author: Andrew Dalke Copyright 1995-1997, Automatrix, Inc., all rights reserved. Author: Skip Montanaro Copyright 1991-1995, Stichting Mathematisch Centrum, all rights reserved. Permission to use, copy, modify, and distribute this Python software and its associated documentation for any purpose without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of neither Automatrix, Bioreason or Mojam Media be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. \end{verbatim} \subsection{UUencode and UUdecode functions} The \module{uu} module contains the following notice: \begin{verbatim} Copyright 1994 by Lance Ellinghouse Cathedral City, California Republic, United States of America. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Lance Ellinghouse not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. LANCE ELLINGHOUSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL LANCE ELLINGHOUSE CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. Modified by Jack Jansen, CWI, July 1995: - Use binascii module to do the actual line-by-line conversion between ascii and binary. This results in a 1000-fold speedup. The C version is still 5 times faster, though. - Arguments more compliant with python standard \end{verbatim} \subsection{XML Remote Procedure Calls} The \module{xmlrpclib} module contains the following notice: \begin{verbatim} The XML-RPC client interface is Copyright (c) 1999-2002 by Secret Labs AB Copyright (c) 1999-2002 by Fredrik Lundh By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read, understood, and will comply with the following terms and conditions: Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Secret Labs AB or the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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. \end{verbatim} python-old-doctools-2.5.5/Doc/commontex/reportingbugs.tex0000644000175000017500000000544410663611551022263 0ustar dokodoko\label{reporting-bugs} Python is a mature programming language which has established a reputation for stability. In order to maintain this reputation, the developers would like to know of any deficiencies you find in Python or its documentation. Before submitting a report, you will be required to log into SourceForge; this will make it possible for the developers to contact you for additional information if needed. It is not possible to submit a bug report anonymously. All bug reports should be submitted via the Python Bug Tracker at (\url{http://bugs.python.org}). The bug tracker offers a Web form which allows pertinent information to be entered and submitted to the developers. The first step in filing a report is to determine whether the problem has already been reported. The advantage in doing so, aside from saving the developers time, is that you learn what has been done to fix it; it may be that the problem has already been fixed for the next release, or additional information is needed (in which case you are welcome to provide it if you can!). To do this, search the bug database using the search box on the top side of the page. If the problem you're reporting is not already in the bug tracker, go back to the Python Bug Tracker. Select the ``Create new'' link at the left of the page to open the bug reporting form. The submission form has a number of fields. The only fields that are required are the ``Title'' and ``Type'' fields. For the title, enter a \emph{very} short description of the problem; less than ten words is good. In the ``Change Note'' field, describe the problem in detail, including what you expected to happen and what did happen. Be sure to include the version of Python you used, whether any extension modules were involved, and what hardware and software platform you were using (including version information as appropriate). The only other field that you may want to set is the ``Components'' field, which allows you to place the bug report into broad categories (such as ``Documentation'' or ``Library''). Each bug report will be assigned to a developer who will determine what needs to be done to correct the problem. You will receive an update each time action is taken on the bug. \begin{seealso} \seetitle[http://www-mice.cs.ucl.ac.uk/multimedia/software/documentation/ReportingBugs.html]{How to Report Bugs Effectively}{Article which goes into some detail about how to create a useful bug report. This describes what kind of information is useful and why it is useful.} \seetitle[http://www.mozilla.org/quality/bug-writing-guidelines.html]{Bug Writing Guidelines}{Information about writing a good bug report. Some of this is specific to the Mozilla project, but describes general good practices.} \end{seealso} python-old-doctools-2.5.5/Doc/commontex/copyright.tex0000644000175000017500000000063510757263104021377 0ustar dokodokoCopyright \copyright{} 2001-2008 Python Software Foundation. All rights reserved. Copyright \copyright{} 2000 BeOpen.com. All rights reserved. Copyright \copyright{} 1995-2000 Corporation for National Research Initiatives. All rights reserved. Copyright \copyright{} 1991-1995 Stichting Mathematisch Centrum. All rights reserved. See the end of this document for complete license and permissions information. python-old-doctools-2.5.5/Doc/commontex/boilerplate.tex0000644000175000017500000000041311124162475021661 0ustar dokodoko\author{Guido van Rossum\\ Fred L. Drake, Jr., editor} \authoraddress{ \strong{Python Software Foundation}\\ Email: \email{docs@python.org} } \date{23rd December, 2008} % XXX update before final release! \input{patchlevel} % include Python version information python-old-doctools-2.5.5/Doc/texinputs/0000755000175000017500000000000011124163010016653 5ustar dokodokopython-old-doctools-2.5.5/Doc/texinputs/underscore.sty0000644000175000017500000002370710220456161021606 0ustar dokodoko% underscore.sty 12-Oct-2001 Donald Arseneau asnd@triumf.ca % Make the "_" character print as "\textunderscore" in text. % Copyright 1998,2001 Donald Arseneau; Distribute freely if unchanged. % Instructions follow after the definitions. \ProvidesPackage{underscore}[2001/10/12] \begingroup \catcode`\_=\active \gdef_{% \relax % No relax gives a small vulnerability in alignments \ifx\if@safe@actives\iftrue % must be outermost test! \string_% \else \ifx\protect\@typeset@protect \ifmmode \sb \else \BreakableUnderscore \fi \else \ifx\protect\@unexpandable@protect \noexpand_% \else \protect_% \fi\fi \fi} \endgroup % At begin: set catcode; fix \long \ttdefault so I can use it in comparisons; \AtBeginDocument{% {\immediate\write\@auxout{\catcode\number\string`\_ \string\active}}% \catcode\string`\_\string=\active \edef\ttdefault{\ttdefault}% } \newcommand{\BreakableUnderscore}{\leavevmode\nobreak\hskip\z@skip \ifx\f@family\ttdefault \string_\else \textunderscore\fi \usc@dischyph\nobreak\hskip\z@skip} \DeclareRobustCommand{\_}{% \ifmmode \nfss@text{\textunderscore}\else \BreakableUnderscore \fi} \let\usc@dischyph\@dischyph \DeclareOption{nohyphen}{\def\usc@dischyph{\discretionary{}{}{}}} \DeclareOption{strings}{\catcode`\_=\active} \ProcessOptions \ifnum\catcode`\_=\active\else \endinput \fi %%%%%%%% Redefine commands that use character strings %%%%%%%% \@ifundefined{UnderscoreCommands}{\let\UnderscoreCommands\@empty}{} \expandafter\def\expandafter\UnderscoreCommands\expandafter{% \UnderscoreCommands \do\include \do\includeonly \do\@input \do\@iinput \do\InputIfFileExists \do\ref \do\pageref \do\newlabel \do\bibitem \do\@bibitem \do\cite \do\nocite \do\bibcite } % Macro to redefine a macro to pre-process its string argument % with \protect -> \string. \def\do#1{% Avoid double processing if user includes command twice! \@ifundefined{US\string_\expandafter\@gobble\string#1}{% \edef\@tempb{\meaning#1}% Check if macro is just a protection shell... \def\@tempc{\protect}% \edef\@tempc{\meaning\@tempc\string#1\space\space}% \ifx\@tempb\@tempc % just a shell: hook into the protected inner command \expandafter\do \csname \expandafter\@gobble\string#1 \expandafter\endcsname \else % Check if macro takes an optional argument \def\@tempc{\@ifnextchar[}% \edef\@tempa{\def\noexpand\@tempa####1\meaning\@tempc}% \@tempa##2##3\@tempa{##2\relax}% \edef\@tempb{\meaning#1\meaning\@tempc}% \edef\@tempc{\noexpand\@tempd \csname US\string_\expandafter\@gobble\string#1\endcsname}% \if \expandafter\@tempa\@tempb \relax 12\@tempa % then no optional arg \@tempc #1\US@prot \else % There is optional arg \@tempc #1\US@protopt \fi \fi }{}} \def\@tempd#1#2#3{\let#1#2\def#2{#3#1}} \def\US@prot#1#2{\let\@@protect\protect \let\protect\string \edef\US@temp##1{##1{#2}}\restore@protect\US@temp#1} \def\US@protopt#1{\@ifnextchar[{\US@protarg#1}{\US@prot#1}} \def\US@protarg #1[#2]{\US@prot{{#1[#2]}}} \UnderscoreCommands \let\do\relax \let\@tempd\relax % un-do %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \endinput underscore.sty 12-Oct-2001 Donald Arseneau Features: ~~~~~~~~~ \_ prints an underscore so that the hyphenation of constituent words is not affected and hyphenation is permitted after the underscore. For example, "compound\_fracture" hyphenates as com- pound_- frac- ture. If you prefer the underscore to break without a hyphen (but still with the same rules for explicit hyphen-breaks) then use the [nohyphen] package option. A simple _ acts just like \_ in text mode, but makes a subscript in math mode: activation_energy $E_a$ Both forms use an underscore character if the font encoding contains one (e.g., "\usepackage[T1]{fontenc}" or typewriter fonts in any encoding), but they use a rule if the there is no proper character. Deficiencies: ~~~~~~~~~~~~~ The skips and penalties ruin any kerning with the underscore character (when a character is used). However, there doesn't seem to be much, if any, such kerning in the ec fonts, and there is never any kerning with a rule. You must avoid "_" in file names and in cite or ref tags, or you must use the babel package, with its active-character controls, or you must give the [strings] option, which attempts to redefine several commands (and may not work perfectly). Even without the [strings] option or babel, you can use occasional underscores like: "\include{file\string_name}". Option: [strings] ~~~~~~~~~~~~~~~~~ The default operation is quite simple and needs no customization; but you must avoid using "_" in any place where LaTeX uses an argument as a string of characters for some control function or as a name. These include the tags for \cite and \ref, file names for \input, \include, and \includegraphics, environment names, counter names, and placement parameters (like "[t]"). The problem with these contexts is that they are `moving arguments' but LaTeX does not `switch on' the \protect mechanism for them. If you need to use the underscore character in these places, the package option [strings] is provided to redefine commands taking a string argument so that the argument is protected (with \protect -> \string). The list of commands is given in "\UnderscoreCommands", with "\do" before each, covering \cite, \ref, \input, and their variants. Not included are many commands regarding font names, everything with counter names, environment names, page styles, and versions of \ref and \cite defined by external packages (e.g. \vref and \citeyear). You can add to the list of supported commands by defining \UnderscoreCommands before loading this package; e.g. \usepackage{chicago} \newcommand{\UnderscoreCommands}{% (\cite already done) \do\citeNP \do\citeA \do\citeANP \do\citeN \do\shortcite \do\shortciteNP \do\shortciteA \do\shortciteANP \do\shortciteN \do\citeyear \do\citeyearNP } \usepackage[strings]{underscore} Not all commands can be supported this way! Only commands that take a string argument *first* can be protected. One optional argument before the string argument is also permitted, as exemplified by \cite: both \cite{tags} and \cite[text]{tags} are allowed. A command like \@addtoreset which takes two counter names as arguments could not be protected by adding it to \UnderscoreCommands. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! When you use the [strings] option, you must load this package !! !! last (or nearly last). !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! There are two reasons: 1) The redefinitions done for protection must come after other packages define their customized versions of those commands. 2) The [strings] option requires the _ character to be activated immediately in order for the cite and ref tags to be read properly from the .aux file as plain strings, and this catcode setting might disrupt other packages. The babel package implements a protection mechanism for many commands, and will be a complete fix for most documents without the [strings] option. Many add-on packages are compatible with babel, so they will get the strings protection also. However, there are several commands that are not covered by babel, but can easily be supported by the [strings] and \UnderscoreCommands mechanism. Beware that using both [strings] and babel may lead to conflicts, but does appear to work (load babel last). Implementation Notes: ~~~~~~~~~~~~~~~~~~~~~ The first setting of "_" to be an active character is performed in a local group so as to not interfere with other packages. The catcode setting is repeated with \AtBeginDocument so the definition is in effect for the text. However, the catcode setting is repeated immediately when the [strings] option is detected. The definition of the active "_" is essentially: \ifmmode \sb \else \BreakableUnderscore \fi where "\sb" retains the normal subscript meaning of "_" and where "\BreakableUnderscore" is essentially "\_". The rest of the definition handles the "\protect"ion without causing \relax to be inserted before the character. \BreakableUnderscore uses "\nobreak\hskip\z@skip" to separate the underscore from surrounding words, thus allowing TeX to hyphenate them, but preventing free breaks around the underscore. Next, it checks the current font family, and uses the underscore character from tt fonts or otherwise \textunderscore (which is a character or rule depending on the font encoding). After the underscore, it inserts a discretionary hyphenation point as "\usc@dischyph", which is usually just "\-" except that it still works in the tabbing environment, although it will give "\discretionary{}{}{}" under the [nohyphen] option. After that, another piece of non-breaking interword glue is inserted. Ordinarily, the comparison "\ifx\f@family\ttdefault" will always fail because \ttdefault is `long' where \f@family is not (boooo hisss), but \ttdefault is redefined to be non-long by "\AtBeginDocument". The "\_" command is then defined to use "\BreakableUnderscore". If the [strings] option is not given, then that is all! Under the [strings] option, the list of special commands is processed to: - retain the original command as \US_command (\US_ref) - redefine the command as \US@prot\US_command for ordinary commands (\ref -> \US@prot\US_ref) or as \US@protopt\US_command when an optional argument is possible (\bibitem -> \US@protopt\US_bibitem). - self-protecting commands (\cite) retain their self-protection. Diagnosing the state of the pre-existing command is done by painful contortions involving \meaning. \US@prot and \US@protopt read the argument, process it with \protect enabled, then invoke the saved \US_command. Modifications: ~~~~~~~~~~~~~~ 12-Oct-2001 Babel (safe@actives) compatibility and [nohyphen] option. Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ python-old-doctools-2.5.5/Doc/texinputs/fncychap.sty0000644000175000017500000002416706644164406021246 0ustar dokodoko%%% Derived from the original fncychap.sty, %%% but changed ``TWELV'' to ``TWELVE''. %%% Copyright Ulf A. Lindgren %%% Department of Applied Electronics %%% Chalmers University of Technology %%% S-412 96 Gothenburg, Sweden %%% E-mail lindgren@ae.chalmers.se %%% %%% Note Permission is granted to modify this file under %%% the condition that it is saved using another %%% file and package name. %%% %%% Revision 1.1 %%% %%% Jan. 8th Modified package name base date option %%% Jan. 22th Modified FmN and FmTi for error in book.cls %%% \MakeUppercase{#}->{\MakeUppercase#} %%% Apr. 6th Modified Lenny option to prevent undesired %%% skip of line. %%% Nov. 8th Fixed \@chapapp for AMS %%% Feb. 11th Fixed appendix problem related to Bjarne %%% Last modified Feb. 11th 1998 \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{fncychap} [1997/04/06 v1.11 LaTeX package (Revised chapters)] %%%% DEFINITION OF Chapapp variables \newcommand{\CNV}{\huge\bfseries} \newcommand{\ChNameVar}[1]{\renewcommand{\CNV}{#1}} %%%% DEFINITION OF TheChapter variables \newcommand{\CNoV}{\huge\bfseries} \newcommand{\ChNumVar}[1]{\renewcommand{\CNoV}{#1}} \newif\ifUCN \UCNfalse \newif\ifLCN \LCNfalse \def\ChNameLowerCase{\LCNtrue\UCNfalse} \def\ChNameUpperCase{\UCNtrue\LCNfalse} \def\ChNameAsIs{\UCNfalse\LCNfalse} %%%%% Fix for AMSBook 971008 \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{} %%%%% Fix for Bjarne and appendix 980211 \newif\ifinapp \inappfalse \renewcommand\appendix{\par \setcounter{chapter}{0}% \setcounter{section}{0}% \inapptrue% \renewcommand\@chapapp{\appendixname}% \renewcommand\thechapter{\@Alph\c@chapter}} %%%%% \newcommand{\FmN}[1]{% \ifUCN {\MakeUppercase#1}\LCNfalse \else \ifLCN {\MakeLowercase#1}\UCNfalse \else #1 \fi \fi} %%%% DEFINITION OF Title variables \newcommand{\CTV}{\Huge\bfseries} \newcommand{\ChTitleVar}[1]{\renewcommand{\CTV}{#1}} %%%% DEFINITION OF the basic rule width \newlength{\RW} \setlength{\RW}{1pt} \newcommand{\ChRuleWidth}[1]{\setlength{\RW}{#1}} \newif\ifUCT \UCTfalse \newif\ifLCT \LCTfalse \def\ChTitleLowerCase{\LCTtrue\UCTfalse} \def\ChTitleUpperCase{\UCTtrue\LCTfalse} \def\ChTitleAsIs{\UCTfalse\LCTfalse} \newcommand{\FmTi}[1]{% \ifUCT {\MakeUppercase#1}\LCTfalse \else \ifLCT {\MakeLowercase#1}\UCTfalse \else #1 \fi \fi} \newlength{\mylen} \newlength{\myhi} \newlength{\px} \newlength{\py} \newlength{\pyy} \newlength{\pxx} \def\mghrulefill#1{\leavevmode\leaders\hrule\@height #1\hfill\kern\z@} \newcommand{\DOCH}{% \CNV\FmN{\@chapapp}\space \CNoV\thechapter \par\nobreak \vskip 20\p@ } \newcommand{\DOTI}[1]{% \CTV\FmTi{#1}\par\nobreak \vskip 40\p@ } \newcommand{\DOTIS}[1]{% \CTV\FmTi{#1}\par\nobreak \vskip 40\p@ } %%%%%% SONNY DEF \DeclareOption{Sonny}{% \ChNameVar{\Large\sf} \ChNumVar{\Huge} \ChTitleVar{\Large\sf} \ChRuleWidth{0.5pt} \ChNameUpperCase \renewcommand{\DOCH}{% \raggedleft \CNV\FmN{\@chapapp}\space \CNoV\thechapter \par\nobreak \vskip 40\p@} \renewcommand{\DOTI}[1]{% \CTV\raggedleft\mghrulefill{\RW}\par\nobreak \vskip 5\p@ \CTV\FmTi{#1}\par\nobreak \mghrulefill{\RW}\par\nobreak \vskip 40\p@} \renewcommand{\DOTIS}[1]{% \CTV\raggedleft\mghrulefill{\RW}\par\nobreak \vskip 5\p@ \CTV\FmTi{#1}\par\nobreak \mghrulefill{\RW}\par\nobreak \vskip 40\p@} } %%%%%% LENNY DEF \DeclareOption{Lenny}{% \ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont} \ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont} \ChTitleVar{\Huge\bfseries\rm} \ChRuleWidth{1pt} \renewcommand{\DOCH}{% \settowidth{\px}{\CNV\FmN{\@chapapp}} \addtolength{\px}{2pt} \settoheight{\py}{\CNV\FmN{\@chapapp}} \addtolength{\py}{1pt} \settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter} \addtolength{\mylen}{1pt} \settowidth{\pxx}{\CNoV\thechapter} \addtolength{\pxx}{-1pt} \settoheight{\pyy}{\CNoV\thechapter} \addtolength{\pyy}{-2pt} \setlength{\myhi}{\pyy} \addtolength{\myhi}{-1\py} \par \parbox[b]{\textwidth}{% \rule[\py]{\RW}{\myhi}% \hskip -\RW% \rule[\pyy]{\px}{\RW}% \hskip -\px% \raggedright% \CNV\FmN{\@chapapp}\space\CNoV\thechapter% \hskip1pt% \mghrulefill{\RW}% \rule{\RW}{\pyy}\par\nobreak% \vskip -\baselineskip% \vskip -\pyy% \hskip \mylen% \mghrulefill{\RW}\par\nobreak% \vskip \pyy}% \vskip 20\p@} \renewcommand{\DOTI}[1]{% \raggedright \CTV\FmTi{#1}\par\nobreak \vskip 40\p@} \renewcommand{\DOTIS}[1]{% \raggedright \CTV\FmTi{#1}\par\nobreak \vskip 40\p@} } %%%%%%% GLENN DEF \DeclareOption{Glenn}{% \ChNameVar{\bfseries\Large\sf} \ChNumVar{\Huge} \ChTitleVar{\bfseries\Large\rm} \ChRuleWidth{1pt} \ChNameUpperCase \ChTitleUpperCase \renewcommand{\DOCH}{% \settoheight{\myhi}{\CTV\FmTi{Test}} \setlength{\py}{\baselineskip} \addtolength{\py}{\RW} \addtolength{\py}{\myhi} \setlength{\pyy}{\py} \addtolength{\pyy}{-1\RW} \raggedright \CNV\FmN{\@chapapp}\space\CNoV\thechapter \hskip 3pt\mghrulefill{\RW}\rule[-1\pyy]{2\RW}{\py}\par\nobreak} \renewcommand{\DOTI}[1]{% \addtolength{\pyy}{-4pt} \settoheight{\myhi}{\CTV\FmTi{#1}} \addtolength{\myhi}{\py} \addtolength{\myhi}{-1\RW} \vskip -1\pyy \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt \raggedleft\CTV\FmTi{#1}\par\nobreak \vskip 80\p@} \renewcommand{\DOTIS}[1]{% \setlength{\py}{10pt} \setlength{\pyy}{\py} \addtolength{\pyy}{\RW} \setlength{\myhi}{\baselineskip} \addtolength{\myhi}{\pyy} \mghrulefill{\RW}\rule[-1\py]{2\RW}{\pyy}\par\nobreak % \addtolength{}{} \vskip -1\baselineskip \rule{2\RW}{\myhi}\mghrulefill{\RW}\hskip 2pt \raggedleft\CTV\FmTi{#1}\par\nobreak \vskip 60\p@} } %%%%%%% CONNY DEF \DeclareOption{Conny}{% \ChNameUpperCase \ChTitleUpperCase \ChNameVar{\centering\Huge\rm\bfseries} \ChNumVar{\Huge} \ChTitleVar{\centering\Huge\rm} \ChRuleWidth{2pt} \renewcommand{\DOCH}{% \mghrulefill{3\RW}\par\nobreak \vskip -0.5\baselineskip \mghrulefill{\RW}\par\nobreak \CNV\FmN{\@chapapp}\space \CNoV\thechapter \par\nobreak \vskip -0.5\baselineskip } \renewcommand{\DOTI}[1]{% \mghrulefill{\RW}\par\nobreak \CTV\FmTi{#1}\par\nobreak \vskip 60\p@ } \renewcommand{\DOTIS}[1]{% \mghrulefill{\RW}\par\nobreak \CTV\FmTi{#1}\par\nobreak \vskip 60\p@ } } %%%%%%% REJNE DEF \DeclareOption{Rejne}{% \ChNameUpperCase \ChTitleUpperCase \ChNameVar{\centering\Large\rm} \ChNumVar{\Huge} \ChTitleVar{\centering\Huge\rm} \ChRuleWidth{1pt} \renewcommand{\DOCH}{% \settoheight{\py}{\CNoV\thechapter} \addtolength{\py}{-1pt} \CNV\FmN{\@chapapp}\par\nobreak \vskip 20\p@ \setlength{\myhi}{2\baselineskip} \setlength{\px}{\myhi} \addtolength{\px}{-1\RW} \rule[-1\px]{\RW}{\myhi}\mghrulefill{\RW}\hskip 10pt\raisebox{-0.5\py}{\CNoV\thechapter}\hskip 10pt\mghrulefill{\RW}\rule[-1\px]{\RW}{\myhi}\par\nobreak \vskip -1\p@ } \renewcommand{\DOTI}[1]{% \setlength{\mylen}{\textwidth} \addtolength{\mylen}{-2\RW} {\vrule width\RW}\parbox{\mylen}{\CTV\FmTi{#1}}{\vrule width\RW}\par\nobreak \vskip -1pt\rule{\RW}{2\baselineskip}\mghrulefill{\RW}\rule{\RW}{2\baselineskip} \vskip 60\p@ } \renewcommand{\DOTIS}[1]{% \setlength{\py}{\fboxrule} \setlength{\fboxrule}{\RW} \setlength{\mylen}{\textwidth} \addtolength{\mylen}{-2\RW} \fbox{\parbox{\mylen}{\vskip 2\baselineskip\CTV\FmTi{#1}\par\nobreak\vskip \baselineskip}} \setlength{\fboxrule}{\py} \vskip 60\p@ } } %%%%%%% BJARNE DEF \DeclareOption{Bjarne}{% \ChNameUpperCase \ChTitleUpperCase \ChNameVar{\raggedleft\normalsize\rm} \ChNumVar{\raggedleft \bfseries\Large} \ChTitleVar{\raggedleft \Large\rm} \ChRuleWidth{1pt} %% Note thechapter -> c@chapter fix appendix bug \newcounter{AlphaCnt} \newcounter{AlphaDecCnt} \newcommand{\AlphaNo}{% \ifcase\number\theAlphaCnt \ifnum\c@chapter=0 ZERO\else{}\fi \or ONE\or TWO\or THREE\or FOUR\or FIVE \or SIX\or SEVEN\or EIGHT\or NINE\or TEN \or ELEVEN\or TWELVE\or THIRTEEN\or FOURTEEN\or FIFTEEN \or SIXTEEN\or SEVENTEEN\or EIGHTEEN\or NINETEEN\fi } \newcommand{\AlphaDecNo}{% \setcounter{AlphaDecCnt}{0} \@whilenum\number\theAlphaCnt>0\do {\addtocounter{AlphaCnt}{-10} \addtocounter{AlphaDecCnt}{1}} \ifnum\number\theAlphaCnt=0 \else \addtocounter{AlphaDecCnt}{-1} \addtocounter{AlphaCnt}{10} \fi \ifcase\number\theAlphaDecCnt\or TEN\or TWENTY\or THIRTY\or FORTY\or FIFTY\or SIXTY\or SEVENTY\or EIGHTY\or NINETY\fi } \newcommand{\TheAlphaChapter}{% \ifinapp \thechapter \else \setcounter{AlphaCnt}{\c@chapter} \ifnum\c@chapter<20 \AlphaNo \else \AlphaDecNo\AlphaNo \fi \fi } \renewcommand{\DOCH}{% \mghrulefill{\RW}\par\nobreak \CNV\FmN{\@chapapp}\par\nobreak \CNoV\TheAlphaChapter\par\nobreak \vskip -1\baselineskip\vskip 5pt\mghrulefill{\RW}\par\nobreak \vskip 20\p@ } \renewcommand{\DOTI}[1]{% \CTV\FmTi{#1}\par\nobreak \vskip 40\p@ } \renewcommand{\DOTIS}[1]{% \CTV\FmTi{#1}\par\nobreak \vskip 40\p@ } } \DeclareOption*{% \PackageWarning{fancychapter}{unknown style option} } \ProcessOptions* \relax \def\@makechapterhead#1{% \vspace*{50\p@}% {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \DOCH \fi \interlinepenalty\@M \DOTI{#1} }} \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]% \else \@makeschapterhead{#1}% \@afterheading \fi} \def\@makeschapterhead#1{% \vspace*{50\p@}% {\parindent \z@ \raggedright \normalfont \interlinepenalty\@M \DOTIS{#1} \vskip 40\p@ }} \endinput python-old-doctools-2.5.5/Doc/texinputs/manual.cls0000644000175000017500000001060110272462237020651 0ustar dokodoko% % manual.cls for the Python documentation % \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{manual} [1998/03/03 Document class (Python manual)] \RequirePackage{pypaper} \RequirePackage{fancybox} % Change the options here to get a different set of basic options, but only % if you have to. Paper and font size should be adjusted in pypaper.sty. % \LoadClass[\py@paper,\py@ptsize,twoside,openright]{report} \setcounter{secnumdepth}{2} % Optional packages: % % If processing of these documents fails at your TeX installation, % these may be commented out (independently) to make things work. % These are both supplied with the current version of the teTeX % distribution. % % The "fancyhdr" package makes nicer page footers reasonable to % implement, and is used to put the chapter and section information in % the footers. % \RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.} % Required packages: % % The "fncychap" package is used to get the nice chapter headers. The % .sty file is distributed with Python, so you should not need to disable % it. You'd also end up with a mixed page style; uglier than stock LaTeX! % \RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.} % Do horizontal rules it this way to match: \newcommand{\py@doHorizontalRule}{\mghrulefill{\RW}} % % % This gives us all the Python-specific markup that we really want. % This should come last. Do not change this. % \RequirePackage{python} % support for module synopsis sections: \newcommand{\py@ModSynopsisFilename}{\jobname\thechapter.syn} \let\py@OldChapter=\chapter \renewcommand{\chapter}{ \py@ProcessModSynopsis \py@closeModSynopsisFile \py@OldChapter } % Change the title page to look a bit better, and fit in with the % fncychap ``Bjarne'' style a bit better. % \renewcommand{\maketitle}{% \begin{titlepage}% \let\footnotesize\small \let\footnoterule\relax \py@doHorizontalRule% \ifpdf \begingroup % This \def is required to deal with multi-line authors; it % changes \\ to ', ' (comma-space), making it pass muster for % generating document info in the PDF file. \def\\{, } \pdfinfo{ /Author (\@author) /Title (\@title) } \endgroup \fi \begin{flushright}% {\rm\Huge\py@HeaderFamily \@title \par}% {\em\LARGE\py@HeaderFamily \py@release\releaseinfo \par} \vfill {\LARGE\py@HeaderFamily \@author \par} \vfill\vfill {\large \@date \par \vfill \py@authoraddress \par }% \end{flushright}%\par \@thanks \end{titlepage}% \setcounter{footnote}{0}% \let\thanks\relax\let\maketitle\relax \gdef\@thanks{}\gdef\@author{}\gdef\@title{} } % Catch the end of the {abstract} environment, but here make sure the % abstract is followed by a blank page if the 'openright' option is used. % \let\py@OldEndAbstract=\endabstract \renewcommand{\endabstract}{ \if@openright \ifodd\value{page} \typeout{Adding blank page after the abstract.} \vfil\pagebreak \fi \fi \py@OldEndAbstract } % This wraps the \tableofcontents macro with all the magic to get the % spacing right and have the right number of pages if the 'openright' % option has been used. This eliminates a fair amount of crud in the % individual document files. % \let\py@OldTableofcontents=\tableofcontents \renewcommand{\tableofcontents}{% \setcounter{page}{1}% \pagebreak% \pagestyle{plain}% {% \parskip = 0mm% \py@OldTableofcontents% \if@openright% \ifodd\value{page}% \typeout{Adding blank page after the table of contents.}% \pagebreak\hspace{0pt}% \fi% \fi% \cleardoublepage% }% \pagenumbering{arabic}% \@ifundefined{fancyhf}{}{\pagestyle{normal}}% \py@doing@page@targetstrue% } % This is needed to get the width of the section # area wide enough in the % library reference. Doing it here keeps it the same for all the manuals. % \renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.6em}} \renewcommand*\l@subsection{\@dottedtocline{2}{4.1em}{3.5em}} \setcounter{tocdepth}{1} % Fix the theindex environment to add an entry to the Table of % Contents; this is much nicer than just having to jump to the end of % the book and flip around, especially with multiple indexes. % \let\py@OldTheindex=\theindex \renewcommand{\theindex}{ \cleardoublepage \py@OldTheindex \addcontentsline{toc}{chapter}{\indexname} } python-old-doctools-2.5.5/Doc/texinputs/howto.cls0000644000175000017500000000542210272462237020541 0ustar dokodoko% % howto.cls for the Python documentation % \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{howto} [1998/02/25 Document class (Python HOWTO)] \RequirePackage{pypaper} \RequirePackage{fancybox} % Change the options here to get a different set of basic options, This % is where to add things like "a4paper" or "10pt". % \LoadClass[\py@paper,\py@ptsize,twoside]{article} \setcounter{secnumdepth}{1} % Optional packages: % % If processing of these documents fails at your TeX installation, % these may be commented out (independently) to make things work. % These are both supplied with the current version of the teTeX % distribution. % % The "fancyhdr" package makes nicer page footers reasonable to % implement, and is used to put the chapter and section information in % the footers. % \RequirePackage{fancyhdr}\typeout{Using fancier footers than usual.} % Required package: % % This gives us all the Python-specific markup that we really want. % This should come last. Do not change this. % \RequirePackage{python} % support for module synopsis sections: \newcommand{\py@ModSynopsisFilename}{\jobname.syn} % need to do one of these.... \newcommand{\py@doHorizontalRule}{\rule{\textwidth}{1pt}} % Change the title page to look a bit better, and fit in with the % fncychap ``Bjarne'' style a bit better. % \renewcommand{\maketitle}{ \py@doHorizontalRule \ifpdf \begingroup % This \def is required to deal with multi-line authors; it % changes \\ to ', ' (comma-space), making it pass muster for % generating document info in the PDF file. \def\\{, } \pdfinfo{ /Author (\@author) /Title (\@title) } \endgroup \fi \begin{flushright} {\rm\Huge\py@HeaderFamily \@title} \par {\em\large\py@HeaderFamily \py@release\releaseinfo} \par \vspace{25pt} {\Large\py@HeaderFamily \@author} \par \vspace{25pt} \@date \par \py@authoraddress \par \end{flushright} \@thanks \setcounter{footnote}{0} \let\thanks\relax\let\maketitle\relax \gdef\@thanks{}\gdef\@author{}\gdef\@title{} } \let\py@OldTableofcontents=\tableofcontents \renewcommand{\tableofcontents}{ \begingroup \parskip = 0mm \py@OldTableofcontents \endgroup \py@doHorizontalRule \vspace{12pt} \py@doing@page@targetstrue } % Fix the theindex environment to add an entry to the Table of % Contents; this is much nicer than just having to jump to the end of % the book and flip around, especially with multiple indexes. % \let\py@OldTheindex=\theindex \renewcommand{\theindex}{ \clearpage \py@OldTheindex \addcontentsline{toc}{section}{\indexname} } \@ifundefined{fancyhf}{ \pagestyle{plain}}{ \pagestyle{normal}} % start this way; change for \pagenumbering{arabic} % ToC & chapters \setcounter{secnumdepth}{2} \thispagestyle{empty} python-old-doctools-2.5.5/Doc/texinputs/distutils.sty0000644000175000017500000000245507077432742021475 0ustar dokodoko% % LaTeX commands and macros needed for the two Distutils manuals, % inst.tex and dist.tex. % % $Id: distutils.sty 15178 2000-04-19 22:40:34Z gward $ % % My gripe list about the Python style files: % * I want italics in verbatim environments for variable % text (verbatim.sty?) % * I hate escaping underscores (url.sty fixes this) % '\command' is for Distutils commands which, depending on your % perspective, are just arguments to the setup script, or sub- % commands of the setup script, or the classes that implement % each "command". \newcommand{\command}[1]{\code{#1}} % '\option' is for Distutils options *in* the setup script. Command- % line options *to* the setup script are marked up in the usual % way, ie. with '\programopt' or '\longprogramopt' \newcommand{\option}[1]{\textsf{\small{#1}}} % '\filevar' is for variable components of file/path names -- eg. % when you put 'prefix' in a pathname, you mark it up with % '\filevar' so that it still looks pathname-ish, but is % distinguished from the literal part of the path. Fred says % this can be accomplished just fine with '\var', but I violently % disagree. Pistols at dawn will sort this one out. \newcommand{\filevar}[1]{{\textsl{\filenq{#1}}}} % Just while the code and docs are still under development. \newcommand{\XXX}[1]{\textbf{**#1**}} python-old-doctools-2.5.5/Doc/texinputs/ltxmarkup.sty0000644000175000017500000000231107457721234021466 0ustar dokodoko% Created by Fred L. Drake, Jr. , as part of the % Python Documentation Project. % % Define some simple markup for the LaTeX command documentation: \ProvidesPackage{ltxmarkup} \RequirePackage{python} % fulllineitems environment % These two macros are used in constructing the last parameter to the % envdesc and macrodesc environments. \newcommand{\py@ltx@optparam}[1]{{[}\var{#1}{]}} \newcommand{\py@ltx@param}[1]{\{\var{#1}\}} \newenvironment{envdesc}[2]{ \begin{fulllineitems} \item[\code{\e begin\{{\bfseries #1}\}{% \let\op=\py@ltx@optparam% \let\p=\py@ltx@param% \let\unspecified=\py@unspecified% \let\moreargs=\py@moreargs% #2}}] \item[\code{\e end\{{\bfseries #1}\}}] \index{#1 environment@\py@idxcode{#1} environment} \index{environments!#1@\py@idxcode{#1}} }{\end{fulllineitems}} \newenvironment{macrodesc}[2]{ \begin{fulllineitems} \item[\code{{\e\bfseries#1}{% \let\op=\py@ltx@optparam% \let\p=\py@ltx@param% \let\unspecified=\py@unspecified% \let\moreargs=\py@moreargs% #2}}] \index{#1@\py@idxcode{#1}} }{\end{fulllineitems}} \newcommand{\env}[1]{\code{#1}} \newcommand{\macro}[1]{\code{\e#1}} python-old-doctools-2.5.5/Doc/texinputs/python.ist0000644000175000017500000000033406612731420020731 0ustar dokodokoline_max 100 headings_flag 1 heading_prefix " \\bigletter " preamble "\\begin{theindex} \\def\\bigletter#1{{\\Large\\sffamily#1}\\nopagebreak\\vspace{1mm}} " symhead_positive "{Symbols}" numhead_positive "{Numbers}" python-old-doctools-2.5.5/Doc/texinputs/pypaper.sty0000644000175000017500000000112506556123012021106 0ustar dokodoko% % Change this to say a4paper instead of letterpaper if you want A4. These % are the latex defaults. % \newcommand{\py@paper}{letterpaper} \newcommand{\py@ptsize}{10pt} % These set up the fonts for the documents. % % The "times" package makes the default font the PostScript Times % font, which makes for smaller PostScript and a font that more people % like. % % The "avant" package causes the AvantGarde font to be used for % sans-serif text, instead of the uglier Helvetica set up by the "times" % package. % \RequirePackage{times}\typeout{Using Times instead of Computer Modern.} python-old-doctools-2.5.5/Doc/texinputs/fancyhdr.sty0000644000175000017500000003455307335035135021243 0ustar dokodoko% fancyhdr.sty version 1.99d % Fancy headers and footers for LaTeX. % Piet van Oostrum, Dept of Computer Science, University of Utrecht % Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands % Telephone: +31 30 2532180. Email: piet@cs.ruu.nl % ======================================================================== % LICENCE: This is free software. You are allowed to use and distribute % this software in any way you like. You are also allowed to make modified % versions of it, but you can distribute a modified version only if you % clearly indicate that it is a modified version and the person(s) who % modified it. This indication should be in a prominent place, e.g. in the % top of the file. If possible a contact address, preferably by email, % should be given for these persons. If that is feasible the modifications % should be indicated in the source code. % ======================================================================== % MODIFICATION HISTORY: % Sep 16, 1994 % version 1.4: Correction for use with \reversemargin % Sep 29, 1994: % version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands % Oct 4, 1994: % version 1.6: Reset single spacing in headers/footers for use with % setspace.sty or doublespace.sty % Oct 4, 1994: % version 1.7: changed \let\@mkboth\markboth to % \def\@mkboth{\protect\markboth} to make it more robust % Dec 5, 1994: % version 1.8: corrections for amsbook/amsart: define \@chapapp and (more % importantly) use the \chapter/sectionmark definitions from ps@headings if % they exist (which should be true for all standard classes). % May 31, 1995: % version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage... % construction in the doc did not work properly with the fancyplain style. % June 1, 1995: % version 1.91: The definition of \@mkboth wasn't restored on subsequent % \pagestyle{fancy}'s. % June 1, 1995: % version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain} % \pagestyle{fancy} would erroneously select the plain version. % June 1, 1995: % version 1.93: \fancypagestyle command added. % Dec 11, 1995: % version 1.94: suggested by Conrad Hughes % CJCH, Dec 11, 1995: added \footruleskip to allow control over footrule % position (old hardcoded value of .3\normalbaselineskip is far too high % when used with very small footer fonts). % Jan 31, 1996: % version 1.95: call \@normalsize in the reset code if that is defined, % otherwise \normalsize. % this is to solve a problem with ucthesis.cls, as this doesn't % define \@currsize. Unfortunately for latex209 calling \normalsize doesn't % work as this is optimized to do very little, so there \@normalsize should % be called. Hopefully this code works for all versions of LaTeX known to % mankind. % April 25, 1996: % version 1.96: initialize \headwidth to a magic (negative) value to catch % most common cases that people change it before calling \pagestyle{fancy}. % Note it can't be initialized when reading in this file, because % \textwidth could be changed afterwards. This is quite probable. % We also switch to \MakeUppercase rather than \uppercase and introduce a % \nouppercase command for use in headers. and footers. % May 3, 1996: % version 1.97: Two changes: % 1. Undo the change in version 1.8 (using the pagestyle{headings} defaults % for the chapter and section marks. The current version of amsbook and % amsart classes don't seem to need them anymore. Moreover the standard % latex classes don't use \markboth if twoside isn't selected, and this is % confusing as \leftmark doesn't work as expected. % 2. include a call to \ps@empty in ps@@fancy. This is to solve a problem % in the amsbook and amsart classes, that make global changes to \topskip, % which are reset in \ps@empty. Hopefully this doesn't break other things. % May 7, 1996: % version 1.98: % Added % after the line \def\nouppercase % May 7, 1996: % version 1.99: This is the alpha version of fancyhdr 2.0 % Introduced the new commands \fancyhead, \fancyfoot, and \fancyhf. % Changed \headrulewidth, \footrulewidth, \footruleskip to % macros rather than length parameters, In this way they can be % conditionalized and they don't consume length registers. There is no need % to have them as length registers unless you want to do calculations with % them, which is unlikely. Note that this may make some uses of them % incompatible (i.e. if you have a file that uses \setlength or \xxxx=) % May 10, 1996: % version 1.99a: % Added a few more % signs % May 10, 1996: % version 1.99b: % Changed the syntax of \f@nfor to be resistent to catcode changes of := % Removed the [1] from the defs of \lhead etc. because the parameter is % consumed by the \@[xy]lhead etc. macros. % June 24, 1997: % version 1.99c: % corrected \nouppercase to also include the protected form of \MakeUppercase % \global added to manipulation of \headwidth. % \iffootnote command added. % Some comments added about \@fancyhead and \@fancyfoot. % Aug 24, 1998 % version 1.99d % Changed the default \ps@empty to \ps@@empty in order to allow % \fancypagestyle{empty} redefinition. \let\fancy@def\gdef \def\if@mpty#1#2#3{\def\temp@ty{#1}\ifx\@empty\temp@ty #2\else#3\fi} % Usage: \@forc \var{charstring}{command to be executed for each char} % This is similar to LaTeX's \@tfor, but expands the charstring. \def\@forc#1#2#3{\expandafter\f@rc\expandafter#1\expandafter{#2}{#3}} \def\f@rc#1#2#3{\def\temp@ty{#2}\ifx\@empty\temp@ty\else \f@@rc#1#2\f@@rc{#3}\fi} \def\f@@rc#1#2#3\f@@rc#4{\def#1{#2}#4\f@rc#1{#3}{#4}} % Usage: \f@nfor\name:=list\do{body} % Like LaTeX's \@for but an empty list is treated as a list with an empty % element \newcommand{\f@nfor}[3]{\edef\@fortmp{#2}% \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}} % Usage: \def@ult \cs{defaults}{argument} % sets \cs to the characters from defaults appearing in argument % or defaults if it would be empty. All characters are lowercased. \newcommand\def@ult[3]{% \edef\temp@a{\lowercase{\edef\noexpand\temp@a{#3}}}\temp@a \def#1{}% \@forc\tmpf@ra{#2}% {\expandafter\if@in\tmpf@ra\temp@a{\edef#1{#1\tmpf@ra}}{}}% \ifx\@empty#1\def#1{#2}\fi} % % \if@in % \newcommand{\if@in}[4]{% \edef\temp@a{#2}\def\temp@b##1#1##2\temp@b{\def\temp@b{##1}}% \expandafter\temp@b#2#1\temp@b\ifx\temp@a\temp@b #4\else #3\fi} \newcommand{\fancyhead}{\@ifnextchar[{\f@ncyhf h}{\f@ncyhf h[]}} \newcommand{\fancyfoot}{\@ifnextchar[{\f@ncyhf f}{\f@ncyhf f[]}} \newcommand{\fancyhf}{\@ifnextchar[{\f@ncyhf {}}{\f@ncyhf {}[]}} % The header and footer fields are stored in command sequences with % names of the form: \f@ncy with for [eo], form [lcr] % and from [hf]. \def\f@ncyhf#1[#2]#3{% \def\temp@c{}% \@forc\tmpf@ra{#2}% {\expandafter\if@in\tmpf@ra{eolcrhf,EOLCRHF}% {}{\edef\temp@c{\temp@c\tmpf@ra}}}% \ifx\@empty\temp@c\else \ifx\PackageError\undefined \errmessage{Illegal char `\temp@c' in fancyhdr argument: [#2]}\else \PackageError{Fancyhdr}{Illegal char `\temp@c' in fancyhdr argument: [#2]}{}\fi \fi \f@nfor\temp@c{#2}% {\def@ult\f@@@eo{eo}\temp@c \def@ult\f@@@lcr{lcr}\temp@c \def@ult\f@@@hf{hf}{#1\temp@c}% \@forc\f@@eo\f@@@eo {\@forc\f@@lcr\f@@@lcr {\@forc\f@@hf\f@@@hf {\expandafter\fancy@def\csname f@ncy\f@@eo\f@@lcr\f@@hf\endcsname {#3}}}}}} % Fancyheadings version 1 commands. These are more or less deprecated, % but they continue to work. \newcommand{\lhead}{\@ifnextchar[{\@xlhead}{\@ylhead}} \def\@xlhead[#1]#2{\fancy@def\f@ncyelh{#1}\fancy@def\f@ncyolh{#2}} \def\@ylhead#1{\fancy@def\f@ncyelh{#1}\fancy@def\f@ncyolh{#1}} \newcommand{\chead}{\@ifnextchar[{\@xchead}{\@ychead}} \def\@xchead[#1]#2{\fancy@def\f@ncyech{#1}\fancy@def\f@ncyoch{#2}} \def\@ychead#1{\fancy@def\f@ncyech{#1}\fancy@def\f@ncyoch{#1}} \newcommand{\rhead}{\@ifnextchar[{\@xrhead}{\@yrhead}} \def\@xrhead[#1]#2{\fancy@def\f@ncyerh{#1}\fancy@def\f@ncyorh{#2}} \def\@yrhead#1{\fancy@def\f@ncyerh{#1}\fancy@def\f@ncyorh{#1}} \newcommand{\lfoot}{\@ifnextchar[{\@xlfoot}{\@ylfoot}} \def\@xlfoot[#1]#2{\fancy@def\f@ncyelf{#1}\fancy@def\f@ncyolf{#2}} \def\@ylfoot#1{\fancy@def\f@ncyelf{#1}\fancy@def\f@ncyolf{#1}} \newcommand{\cfoot}{\@ifnextchar[{\@xcfoot}{\@ycfoot}} \def\@xcfoot[#1]#2{\fancy@def\f@ncyecf{#1}\fancy@def\f@ncyocf{#2}} \def\@ycfoot#1{\fancy@def\f@ncyecf{#1}\fancy@def\f@ncyocf{#1}} \newcommand{\rfoot}{\@ifnextchar[{\@xrfoot}{\@yrfoot}} \def\@xrfoot[#1]#2{\fancy@def\f@ncyerf{#1}\fancy@def\f@ncyorf{#2}} \def\@yrfoot#1{\fancy@def\f@ncyerf{#1}\fancy@def\f@ncyorf{#1}} \newdimen\headwidth \newcommand{\headrulewidth}{0.4pt} \newcommand{\footrulewidth}{\z@skip} \newcommand{\footruleskip}{.3\normalbaselineskip} % Fancyplain stuff shouldn't be used anymore (rather % \fancypagestyle{plain} should be used), but it must be present for % compatibility reasons. \newcommand{\plainheadrulewidth}{\z@skip} \newcommand{\plainfootrulewidth}{\z@skip} \newif\if@fancyplain \@fancyplainfalse \def\fancyplain#1#2{\if@fancyplain#1\else#2\fi} \headwidth=-123456789sp %magic constant % Command to reset various things in the headers: % a.o. single spacing (taken from setspace.sty) % and the catcode of ^^M (so that epsf files in the header work if a % verbatim crosses a page boundary) % It also defines a \nouppercase command that disables \uppercase and % \Makeuppercase. It can only be used in the headers and footers. \def\fancy@reset{\restorecr \def\baselinestretch{1}% \def\nouppercase##1{{\let\uppercase\relax\let\MakeUppercase\relax \expandafter\let\csname MakeUppercase \endcsname\relax##1}}% \ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e \ifx\@normalsize\undefined \normalsize % for ucthesis.cls \else \@normalsize \fi \else% NFSS (2.09) present \@newbaseline% \fi} % Initialization of the head and foot text. % The default values still contain \fancyplain for compatibility. \fancyhf{} % clear all % lefthead empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages % evenhead empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages \fancyhead[el,or]{\fancyplain{}{\sl\rightmark}} \fancyhead[er,ol]{\fancyplain{}{\sl\leftmark}} \fancyfoot[c]{\rm\thepage} % page number % Put together a header or footer given the left, center and % right text, fillers at left and right and a rule. % The \lap commands put the text into an hbox of zero size, % so overlapping text does not generate an errormessage. % These macros have 5 parameters: % 1. \@lodd or \@rodd % This determines at which side the header will stick % out. % 2. \f@ncyolh, \f@ncyelh, \f@ncyolf or \f@ncyelf. This is the left component. % 3. \f@ncyoch, \f@ncyech, \f@ncyocf or \f@ncyecf. This is the middle comp. % 4. \f@ncyorh, \f@ncyerh, \f@ncyorf or \f@ncyerf. This is the right component. % 5. \@lodd or \@rodd % This determines at which side the header will stick % out. This is the reverse of parameter nr. 1. One of them is always % \relax and the other one is \hss (after expansion). \def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\hbox {\rlap{\parbox[b]{\headwidth}{\raggedright#2\strut}}\hfill \parbox[b]{\headwidth}{\centering#3\strut}\hfill \llap{\parbox[b]{\headwidth}{\raggedleft#4\strut}}}\headrule}}#5} \def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\footrule \hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2\strut}}\hfill \parbox[t]{\headwidth}{\centering#3\strut}\hfill \llap{\parbox[t]{\headwidth}{\raggedleft#4\strut}}}}}#5} \def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi \hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}} \def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi \vskip-\footruleskip\vskip-\footrulewidth \hrule\@width\headwidth\@height\footrulewidth\vskip\footruleskip}} \def\ps@fancy{% \@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook % % Define \MakeUppercase for old LaTeXen. % Note: we used \def rather than \let, so that \let\uppercase\relax (from % the version 1 documentation) will still work. % \@ifundefined{MakeUppercase}{\def\MakeUppercase{\uppercase}}{}% \@ifundefined{chapter}{\def\sectionmark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\z@ \thesection\hskip 1em\relax \fi ##1}}{}}% \def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne \thesubsection\hskip 1em\relax \fi ##1}}}% {\def\chaptermark##1{\markboth {\MakeUppercase{\ifnum \c@secnumdepth>\m@ne \@chapapp\ \thechapter. \ \fi ##1}}{}}% \def\sectionmark##1{\markright{\MakeUppercase{\ifnum \c@secnumdepth >\z@ \thesection. \ \fi ##1}}}}% %\csname ps@headings\endcsname % use \ps@headings defaults if they exist \ps@@fancy \gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}% % Initialize \headwidth if the user didn't % \ifdim\headwidth<0sp % % This catches the case that \headwidth hasn't been initialized and the % case that the user added something to \headwidth in the expectation that % it was initialized to \textwidth. We compensate this now. This loses if % the user intended to multiply it by a factor. But that case is more % likely done by saying something like \headwidth=1.2\textwidth. % The doc says you have to change \headwidth after the first call to % \pagestyle{fancy}. This code is just to catch the most common cases were % that requirement is violated. % \global\advance\headwidth123456789sp\global\advance\headwidth\textwidth \fi} \def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy} \def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy} \let\ps@@empty\ps@empty \def\ps@@fancy{% \ps@@empty % This is for amsbook/amsart, which do strange things with \topskip \def\@mkboth{\protect\markboth}% \def\@oddhead{\@fancyhead\@lodd\f@ncyolh\f@ncyoch\f@ncyorh\@rodd}% \def\@oddfoot{\@fancyfoot\@lodd\f@ncyolf\f@ncyocf\f@ncyorf\@rodd}% \def\@evenhead{\@fancyhead\@rodd\f@ncyelh\f@ncyech\f@ncyerh\@lodd}% \def\@evenfoot{\@fancyfoot\@rodd\f@ncyelf\f@ncyecf\f@ncyerf\@lodd}% } \def\@lodd{\if@reversemargin\hss\else\relax\fi} \def\@rodd{\if@reversemargin\relax\else\hss\fi} \newif\iffootnote \let\latex@makecol\@makecol \def\@makecol{\ifvoid\footins\footnotetrue\else\footnotefalse\fi \let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol} \def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi} \def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi} \def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi} \newcommand{\fancypagestyle}[2]{% \@namedef{ps@#1}{\let\fancy@def\def#2\relax\ps@fancy}} python-old-doctools-2.5.5/Doc/texinputs/python.sty0000644000175000017500000012037310612336654020764 0ustar dokodoko% % python.sty for the Python docummentation [works only with Latex2e] % \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesPackage{python} [1998/01/11 LaTeX package (Python markup)] \RequirePackage{longtable} \RequirePackage{underscore} % Uncomment these two lines to ignore the paper size and make the page % size more like a typical published manual. %\renewcommand{\paperheight}{9in} %\renewcommand{\paperwidth}{8.5in} % typical squarish manual %\renewcommand{\paperwidth}{7in} % O'Reilly ``Programmming Python'' % These packages can be used to add marginal annotations which indicate % index entries and labels; useful for reviewing this messy documentation! % %\RequirePackage{showkeys} %\RequirePackage{showidx} % If we ever want to indent paragraphs, this needs to be changed. % This is used inside the macros defined here instead of coding % \noindent directly. \let\py@parindent=\noindent % for PDF output, use maximal compression & a lot of other stuff % (test for PDF recommended by Tanmoy Bhattacharya ) % \newif\ifpy@doing@page@targets \py@doing@page@targetsfalse \newif\ifpdf\pdffalse \ifx\pdfoutput\undefined\else\ifcase\pdfoutput \else \pdftrue \input{pdfcolor} \let\py@LinkColor=\NavyBlue \let\py@NormalColor=\Black \pdfcompresslevel=9 \pdfpagewidth=\paperwidth % page width of PDF output \pdfpageheight=\paperheight % page height of PDF output % % Pad the number with '0' to 3 digits wide so no page name is a prefix % of any other. % \newcommand{\py@targetno}[1]{\ifnum#1<100 0\fi\ifnum#1<10 0\fi#1} \newcommand{\py@pageno}{\py@targetno\thepage} % % This definition allows the entries in the page-view of the ToC to be % active links. Some work, some don't. % \let\py@OldContentsline=\contentsline % % Backward compatibility hack: pdfTeX 0.13 defined \pdfannotlink, % but it changed to \pdfstartlink in 0.14. This let's us use either % version and still get useful behavior. % \@ifundefined{pdfstartlink}{ \let\pdfstartlink=\pdfannotlink }{} % % The \py@parindent here is a hack -- we're forcing pdfTeX into % horizontal mode since \pdfstartlink requires that. \def\py@pdfstartlink{% \ifvmode\py@parindent\fi% \pdfstartlink% } % % Macro that takes two args: the name to link to and the content of % the link. This takes care of the PDF magic, getting the colors % the same for each link, and avoids having lots of garbage all over % this style file. \newcommand{\py@linkToName}[2]{% \py@pdfstartlink attr{/Border [0 0 0]} goto name{#1}% \py@LinkColor#2\py@NormalColor% \pdfendlink% } % Compute the padded page number separately since we end up with a pair of % \relax tokens; this gets the right string computed and works. \renewcommand{\contentsline}[3]{% \def\my@pageno{\py@targetno{#3}}% \py@OldContentsline{#1}{\py@linkToName{page\my@pageno}{#2}}{#3}% } \AtEndDocument{ \def\_{\string_} \InputIfFileExists{\jobname.bkm}{\pdfcatalog{/PageMode /UseOutlines}}{} } \newcommand{\py@target}[1]{% \ifpy@doing@page@targets% {\pdfdest name{#1} xyz}% \fi% } \let\py@OldLabel=\label \renewcommand{\label}[1]{% \py@OldLabel{#1}% \py@target{label-#1}% } % This stuff adds a page# destination to every PDF page, where # is three % digits wide, padded with leading zeros. This doesn't really help with % the frontmatter, but does fine with the body. % % This is *heavily* based on the hyperref package. % \def\@begindvi{% \unvbox \@begindvibox \@hyperfixhead } \def\@hyperfixhead{% \let\H@old@thehead\@thehead \global\def\@foo{\py@target{page\py@pageno}}% \expandafter\ifx\expandafter\@empty\H@old@thehead \def\H@old@thehead{\hfil}\fi \def\@thehead{\@foo\relax\H@old@thehead}% } \fi\fi % Increase printable page size (copied from fullpage.sty) \topmargin 0pt \advance \topmargin by -\headheight \advance \topmargin by -\headsep % attempt to work a little better for A4 users \textheight \paperheight \advance\textheight by -2in \oddsidemargin 0pt \evensidemargin 0pt %\evensidemargin -.25in % for ``manual size'' documents \marginparwidth 0.5in \textwidth \paperwidth \advance\textwidth by -2in % Style parameters and macros used by most documents here \raggedbottom \sloppy \parindent = 0mm \parskip = 2mm \hbadness = 5000 % don't print trivial gripes \pagestyle{empty} % start this way; change for \pagenumbering{roman} % ToC & chapters % Use this to set the font family for headers and other decor: \newcommand{\py@HeaderFamily}{\sffamily} % Set up abstract ways to get the normal and smaller font sizes that % work even in footnote context. \newif\ifpy@infootnote \py@infootnotefalse \let\py@oldmakefntext\@makefntext \def\@makefntext#1{% \bgroup% \py@infootnotetrue \py@oldmakefntext{#1}% \egroup% } \def\py@defaultsize{% \ifpy@infootnote\footnotesize\else\normalsize\fi% } \def\py@smallsize{% \ifpy@infootnote\scriptsize\else\small\fi% } % Redefine the 'normal' header/footer style when using "fancyhdr" package: \@ifundefined{fancyhf}{}{ % Use \pagestyle{normal} as the primary pagestyle for text. \fancypagestyle{normal}{ \fancyhf{} \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}} \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}} \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0.4pt} } % Update the plain style so we get the page number & footer line, % but not a chapter or section title. This is to keep the first % page of a chapter and the blank page between chapters `clean.' \fancypagestyle{plain}{ \fancyhf{} \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0.4pt} } % Redefine \cleardoublepage so that the blank page between chapters % gets the plain style and not the fancy style. This is described % in the documentation for the fancyhdr package by Piet von Oostrum. \@ifundefined{chapter}{}{ \renewcommand{\cleardoublepage}{ \clearpage\if@openright \ifodd\c@page\else \hbox{} \thispagestyle{plain} \newpage \if@twocolumn\hbox{}\newpage\fi\fi\fi } } } % This sets up the {verbatim} environment to be indented and a minipage, % and to have all the other mostly nice properties that we want for % code samples. \let\py@OldVerbatim=\verbatim \let\py@OldEndVerbatim=\endverbatim \RequirePackage{verbatim} \let\py@OldVerbatimInput=\verbatiminput % Variable used by begin code command \newlength{\py@codewidth} \renewcommand{\verbatim}{% \setlength{\parindent}{1cm}% % Calculate the text width for the minipage: \setlength{\py@codewidth}{\linewidth}% \addtolength{\py@codewidth}{-\parindent}% % \par\indent% \begin{minipage}[t]{\py@codewidth}% \small% \py@OldVerbatim% } \renewcommand{\endverbatim}{% \py@OldEndVerbatim% \end{minipage}% } \renewcommand{\verbatiminput}[1]{% {\setlength{\parindent}{1cm}% % Calculate the text width for the minipage: \setlength{\py@codewidth}{\linewidth}% \addtolength{\py@codewidth}{-\parindent}% % \small% \begin{list}{}{\setlength{\leftmargin}{1cm}} \item% \py@OldVerbatimInput{#1}% \end{list} }% } % This does a similar thing for the {alltt} environment: \RequirePackage{alltt} \let\py@OldAllTT=\alltt \let\py@OldEndAllTT=\endalltt \renewcommand{\alltt}{% \setlength{\parindent}{1cm}% % Calculate the text width for the minipage: \setlength{\py@codewidth}{\linewidth}% \addtolength{\py@codewidth}{-\parindent}% \let\e=\textbackslash% % \par\indent% \begin{minipage}[t]{\py@codewidth}% \small% \py@OldAllTT% } \renewcommand{\endalltt}{% \py@OldEndAllTT% \end{minipage}% } \newcommand{\py@modulebadkey}{{--just-some-junk--}} %% Lots of index-entry generation support. % Command to wrap around stuff that refers to function / module / % attribute names in the index. Default behavior: like \code{}. To % just keep the index entries in the roman font, uncomment the second % definition; it matches O'Reilly style more. % \newcommand{\py@idxcode}[1]{\texttt{#1}} %\renewcommand{\py@idxcode}[1]{#1} % Command to generate two index entries (using subentries) \newcommand{\indexii}[2]{\index{#1!#2}\index{#2!#1}} % And three entries (using only one level of subentries) \newcommand{\indexiii}[3]{\index{#1!#2 #3}\index{#2!#3, #1}\index{#3!#1 #2}} % And four (again, using only one level of subentries) \newcommand{\indexiv}[4]{ \index{#1!#2 #3 #4} \index{#2!#3 #4, #1} \index{#3!#4, #1 #2} \index{#4!#1 #2 #3} } % Command to generate a reference to a function, statement, keyword, % operator. \newcommand{\kwindex}[1]{\indexii{keyword}{#1@{\py@idxcode{#1}}}} \newcommand{\stindex}[1]{\indexii{statement}{#1@{\py@idxcode{#1}}}} \newcommand{\opindex}[1]{\indexii{operator}{#1@{\py@idxcode{#1}}}} \newcommand{\exindex}[1]{\indexii{exception}{#1@{\py@idxcode{#1}}}} \newcommand{\obindex}[1]{\indexii{object}{#1}} \newcommand{\bifuncindex}[1]{% \index{#1@{\py@idxcode{#1()}} (built-in function)}} % Add an index entry for a module \newcommand{\py@refmodule}[2]{\index{#1@{\py@idxcode{#1}} (#2module)}} \newcommand{\refmodindex}[1]{\py@refmodule{#1}{}} \newcommand{\refbimodindex}[1]{\py@refmodule{#1}{built-in }} \newcommand{\refexmodindex}[1]{\py@refmodule{#1}{extension }} \newcommand{\refstmodindex}[1]{\py@refmodule{#1}{standard }} % Refer to a module's documentation using a hyperlink of the module's % name, at least if we're building PDF: \ifpdf \newcommand{\refmodule}[2][\py@modulebadkey]{% \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% \py@linkToName{label-module-\py@modulekey}{\module{#2}}% } \else \newcommand{\refmodule}[2][\py@modulebadkey]{\module{#2}} \fi % support for the module index \newif\ifpy@UseModuleIndex \py@UseModuleIndexfalse \newcommand{\makemodindex}{ \newwrite\modindexfile \openout\modindexfile=mod\jobname.idx \py@UseModuleIndextrue } % Add the defining entry for a module \newcommand{\py@modindex}[2]{% \renewcommand{\py@thismodule}{#1} \setindexsubitem{(in module #1)}% \index{#1@{\py@idxcode{#1}} (#2module)|textbf}% \ifpy@UseModuleIndex% \@ifundefined{py@modplat@\py@thismodulekey}{ \write\modindexfile{\protect\indexentry{#1@{\texttt{#1}}}{\thepage}}% }{\write\modindexfile{\protect\indexentry{#1@{\texttt{#1} % \emph{(\py@platformof[\py@thismodulekey]{})}}}{\thepage}}% } \fi% } % *** XXX *** THE NEXT FOUR MACROS ARE NOW OBSOLETE !!! *** % built-in & Python modules in the main distribution \newcommand{\bimodindex}[1]{\py@modindex{#1}{built-in }% \typeout{*** MACRO bimodindex IS OBSOLETE -- USE declaremodule INSTEAD!}} \newcommand{\stmodindex}[1]{\py@modindex{#1}{standard }% \typeout{*** MACRO stmodindex IS OBSOLETE -- USE declaremodule INSTEAD!}} % Python & extension modules outside the main distribution \newcommand{\modindex}[1]{\py@modindex{#1}{}% \typeout{*** MACRO modindex IS OBSOLETE -- USE declaremodule INSTEAD!}} \newcommand{\exmodindex}[1]{\py@modindex{#1}{extension }% \typeout{*** MACRO exmodindex IS OBSOLETE -- USE declaremodule INSTEAD!}} % Additional string for an index entry \newif\ifpy@usingsubitem\py@usingsubitemfalse \newcommand{\py@indexsubitem}{} \newcommand{\setindexsubitem}[1]{\renewcommand{\py@indexsubitem}{ #1}% \py@usingsubitemtrue} \newcommand{\ttindex}[1]{% \ifpy@usingsubitem \index{#1@{\py@idxcode{#1}}\py@indexsubitem}% \else% \index{#1@{\py@idxcode{#1}}}% \fi% } \newcommand{\withsubitem}[2]{% \begingroup% \def\ttindex##1{\index{##1@{\py@idxcode{##1}} #1}}% #2% \endgroup% } % Module synopsis processing ----------------------------------------------- % \newcommand{\py@thisclass}{} \newcommand{\py@thismodule}{} \newcommand{\py@thismodulekey}{} \newcommand{\py@thismoduletype}{} \newcommand{\py@standardIndexModule}[1]{\py@modindex{#1}{standard }} \newcommand{\py@builtinIndexModule}[1]{\py@modindex{#1}{built-in }} \newcommand{\py@extensionIndexModule}[1]{\py@modindex{#1}{extension }} \newcommand{\py@IndexModule}[1]{\py@modindex{#1}{}} \newif\ifpy@HaveModSynopsis \py@HaveModSynopsisfalse \newif\ifpy@ModSynopsisFileIsOpen \py@ModSynopsisFileIsOpenfalse \newif\ifpy@HaveModPlatform \py@HaveModPlatformfalse % \declaremodule[key]{type}{name} \newcommand{\declaremodule}[3][\py@modulebadkey]{ \py@openModSynopsisFile \renewcommand{\py@thismoduletype}{#2} \ifx\py@modulebadkey#1 \renewcommand{\py@thismodulekey}{#3} \else \renewcommand{\py@thismodulekey}{#1} \fi \@ifundefined{py@#2IndexModule}{% \typeout{*** MACRO declaremodule called with unknown module type: `#2'} \py@IndexModule{#3}% }{% \csname py@#2IndexModule\endcsname{#3}% } \label{module-\py@thismodulekey} } \newif\ifpy@ModPlatformFileIsOpen \py@ModPlatformFileIsOpenfalse \newcommand{\py@ModPlatformFilename}{\jobname.pla} \newcommand{\platform}[1]{ \ifpy@ModPlatformFileIsOpen\else \newwrite\py@ModPlatformFile \openout\py@ModPlatformFile=\py@ModPlatformFilename \py@ModPlatformFileIsOpentrue \fi } \InputIfFileExists{\jobname.pla}{}{} \newcommand{\py@platformof}[2][\py@modulebadkey]{% \ifx\py@modulebadkey#1 \def\py@key{#2}% \else \def\py@key{#1}% \fi% \csname py@modplat@\py@key\endcsname% } \newcommand{\ignorePlatformAnnotation}[1]{} % \moduleauthor{name}{email} \newcommand{\moduleauthor}[2]{} % \sectionauthor{name}{email} \newcommand{\sectionauthor}[2]{} \newcommand{\py@defsynopsis}{Module has no synopsis.} \newcommand{\py@modulesynopsis}{\py@defsynopsis} \newcommand{\modulesynopsis}[1]{ \py@HaveModSynopsistrue \renewcommand{\py@modulesynopsis}{#1} } % define the file \newwrite\py@ModSynopsisFile % hacked from \addtocontents from latex.ltx: \long\def\py@writeModSynopsisFile#1{% \protected@write\py@ModSynopsisFile% {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}% {\string#1}% } \newcommand{\py@closeModSynopsisFile}{ \ifpy@ModSynopsisFileIsOpen \closeout\py@ModSynopsisFile \py@ModSynopsisFileIsOpenfalse \fi } \newcommand{\py@openModSynopsisFile}{ \ifpy@ModSynopsisFileIsOpen\else \openout\py@ModSynopsisFile=\py@ModSynopsisFilename \py@ModSynopsisFileIsOpentrue \fi } \newcommand{\py@ProcessModSynopsis}{ \ifpy@HaveModSynopsis \py@writeModSynopsisFile{\modulesynopsis% {\py@thismodulekey}{\py@thismodule}% {\py@thismoduletype}{\py@modulesynopsis}}% \py@HaveModSynopsisfalse \fi \renewcommand{\py@modulesynopsis}{\py@defsynopsis} } \AtEndDocument{\py@ProcessModSynopsis\py@closeModSynopsisFile} \long\def\py@writeModPlatformFile#1{% \protected@write\py@ModPlatformFile% {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble}% {\string#1}% } \newcommand{\localmoduletable}{ \IfFileExists{\py@ModSynopsisFilename}{ \begin{synopsistable} \input{\py@ModSynopsisFilename} \end{synopsistable} }{} } \ifpdf \newcommand{\py@ModSynopsisSummary}[4]{% \py@linkToName{label-module-#1}{\bfcode{#2}} & #4\\ } \else \newcommand{\py@ModSynopsisSummary}[4]{\bfcode{#2} & #4\\} \fi \newenvironment{synopsistable}{ % key, name, type, synopsis \let\modulesynopsis=\py@ModSynopsisSummary \begin{tabular}{ll} }{ \end{tabular} } % % -------------------------------------------------------------------------- \newcommand{\py@reset}{ \py@usingsubitemfalse \py@ProcessModSynopsis \renewcommand{\py@thisclass}{} \renewcommand{\py@thismodule}{} \renewcommand{\py@thismodulekey}{} \renewcommand{\py@thismoduletype}{} } % Augment the sectioning commands used to get our own font family in place, % and reset some internal data items: \renewcommand{\section}{\py@reset% \@startsection{section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\reset@font\Large\py@HeaderFamily}} \renewcommand{\subsection}{\@startsection{subsection}{2}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\reset@font\large\py@HeaderFamily}} \renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{\z@}% {-3.25ex\@plus -1ex \@minus -.2ex}% {1.5ex \@plus .2ex}% {\reset@font\normalsize\py@HeaderFamily}} \renewcommand{\paragraph}{\@startsection{paragraph}{4}{\z@}% {3.25ex \@plus1ex \@minus.2ex}% {-1em}% {\reset@font\normalsize\py@HeaderFamily}} \renewcommand{\subparagraph}{\@startsection{subparagraph}{5}{\parindent}% {3.25ex \@plus1ex \@minus .2ex}% {-1em}% {\reset@font\normalsize\py@HeaderFamily}} % Now for a lot of semantically-loaded environments that do a ton of magical % things to get the right formatting and index entries for the stuff in % Python modules and C API. % {fulllineitems} is used in one place in libregex.tex, but is really for % internal use in this file. % \newcommand{\py@itemnewline}[1]{% \@tempdima\linewidth% \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}% } \newenvironment{fulllineitems}{ \begin{list}{}{\labelwidth \leftmargin \labelsep 0pt \rightmargin 0pt \topsep -\parskip \partopsep \parskip \itemsep -\parsep \let\makelabel=\py@itemnewline} }{\end{list}} % \optional is mostly for use in the arguments parameters to the various % {*desc} environments defined below, but may be used elsewhere. Known to % be used in the debugger chapter. % % Typical usage: % % \begin{funcdesc}{myfunc}{reqparm\optional{, optparm}} % ^^^ ^^^ % No space here No space here % % When a function has multiple optional parameters, \optional should be % nested, not chained. This is right: % % \begin{funcdesc}{myfunc}{\optional{parm1\optional{, parm2}}} % \let\py@badkey=\@undefined \newcommand{\optional}[1]{% {\textnormal{\Large[}}{#1}\hspace{0.5mm}{\textnormal{\Large]}}} % This can be used when a function or method accepts an varying number % of arguments, such as by using the *args syntax in the parameter list. \newcommand{\py@moreargs}{...} % This can be used when you don't want to document the parameters to a % function or method, but simply state that it's an alias for % something else. \newcommand{\py@unspecified}{...} \newlength{\py@argswidth} \newcommand{\py@sigparams}[1]{% \parbox[t]{\py@argswidth}{\py@varvars{#1}\code{)}}} \newcommand{\py@sigline}[2]{% \settowidth{\py@argswidth}{#1\code{(}}% \addtolength{\py@argswidth}{-2\py@argswidth}% \addtolength{\py@argswidth}{\textwidth}% \item[#1\code{(}\py@sigparams{#2}]} % C functions ------------------------------------------------------------ % \begin{cfuncdesc}[refcount]{type}{name}{arglist} % Note that the [refcount] slot should only be filled in by % tools/anno-api.py; it pulls the value from the refcounts database. \newcommand{\cfuncline}[3]{ \py@sigline{\code{#1 \bfcode{#2}}}{#3}% \index{#2@{\py@idxcode{#2()}}} } \newenvironment{cfuncdesc}[4][\py@badkey]{ \begin{fulllineitems} \cfuncline{#2}{#3}{#4} \ifx\@undefined#1\relax\else% \emph{Return value: \textbf{#1}.}\\ \fi }{\end{fulllineitems}} % C variables ------------------------------------------------------------ % \begin{cvardesc}{type}{name} \newenvironment{cvardesc}[2]{ \begin{fulllineitems} \item[\code{#1 \bfcode{#2}}\index{#2@{\py@idxcode{#2}}}] }{\end{fulllineitems}} % C data types ----------------------------------------------------------- % \begin{ctypedesc}[index name]{typedef name} \newenvironment{ctypedesc}[2][\py@badkey]{ \begin{fulllineitems} \item[\bfcode{#2}% \ifx\@undefined#1\relax% \index{#2@{\py@idxcode{#2}} (C type)} \else% \index{#2@{\py@idxcode{#1}} (C type)} \fi] }{\end{fulllineitems}} % C type fields ---------------------------------------------------------- % \begin{cmemberdesc}{container type}{ctype}{membername} \newcommand{\cmemberline}[3]{ \item[\code{#2 \bfcode{#3}}] \index{#3@{\py@idxcode{#3}} (#1 member)} } \newenvironment{cmemberdesc}[3]{ \begin{fulllineitems} \cmemberline{#1}{#2}{#3} }{\end{fulllineitems}} % Funky macros ----------------------------------------------------------- % \begin{csimplemacrodesc}{name} % -- "simple" because it has no args; NOT for constant definitions! \newenvironment{csimplemacrodesc}[1]{ \begin{fulllineitems} \item[\bfcode{#1}\index{#1@{\py@idxcode{#1}} (macro)}] }{\end{fulllineitems}} % simple functions (not methods) ----------------------------------------- % \begin{funcdesc}{name}{args} \newcommand{\funcline}[2]{% \funclineni{#1}{#2}% \index{#1@{\py@idxcode{#1()}} (in module \py@thismodule)}} \newenvironment{funcdesc}[2]{ \begin{fulllineitems} \funcline{#1}{#2} }{\end{fulllineitems}} % similar to {funcdesc}, but doesn't add to the index \newcommand{\funclineni}[2]{% \py@sigline{\bfcode{#1}}{#2}} \newenvironment{funcdescni}[2]{ \begin{fulllineitems} \funclineni{#1}{#2} }{\end{fulllineitems}} % classes ---------------------------------------------------------------- % \begin{classdesc}{name}{constructor args} \newenvironment{classdesc}[2]{ % Using \renewcommand doesn't work for this, for unknown reasons: \global\def\py@thisclass{#1} \begin{fulllineitems} \py@sigline{\strong{class }\bfcode{#1}}{#2}% \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)} }{\end{fulllineitems}} % \begin{classdesc*}{name} \newenvironment{classdesc*}[1]{ % Using \renewcommand doesn't work for this, for unknown reasons: \global\def\py@thisclass{#1} \begin{fulllineitems} \item[\strong{class }\code{\bfcode{#1}}% \index{#1@{\py@idxcode{#1}} (class in \py@thismodule)}] }{\end{fulllineitems}} % \begin{excclassdesc}{name}{constructor args} % but indexes as an exception \newenvironment{excclassdesc}[2]{ % Using \renewcommand doesn't work for this, for unknown reasons: \global\def\py@thisclass{#1} \begin{fulllineitems} \py@sigline{\strong{exception }\bfcode{#1}}{#2}% \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)} }{\end{fulllineitems}} % There is no corresponding {excclassdesc*} environment. To describe % a class exception without parameters, use the {excdesc} environment. \let\py@classbadkey=\@undefined % object method ---------------------------------------------------------- % \begin{methoddesc}[classname]{methodname}{args} \newcommand{\methodline}[3][\@undefined]{ \methodlineni{#2}{#3} \ifx\@undefined#1\relax \index{#2@{\py@idxcode{#2()}} (\py@thisclass\ method)} \else \index{#2@{\py@idxcode{#2()}} (#1 method)} \fi } \newenvironment{methoddesc}[3][\@undefined]{ \begin{fulllineitems} \ifx\@undefined#1\relax \methodline{#2}{#3} \else \def\py@thisclass{#1} \methodline{#2}{#3} \fi }{\end{fulllineitems}} % similar to {methoddesc}, but doesn't add to the index % (never actually uses the optional argument) \newcommand{\methodlineni}[3][\py@classbadkey]{% \py@sigline{\bfcode{#2}}{#3}} \newenvironment{methoddescni}[3][\py@classbadkey]{ \begin{fulllineitems} \methodlineni{#2}{#3} }{\end{fulllineitems}} % object data attribute -------------------------------------------------- % \begin{memberdesc}[classname]{membername} \newcommand{\memberline}[2][\py@classbadkey]{% \ifx\@undefined#1\relax \memberlineni{#2} \index{#2@{\py@idxcode{#2}} (\py@thisclass\ attribute)} \else \memberlineni{#2} \index{#2@{\py@idxcode{#2}} (#1 attribute)} \fi } \newenvironment{memberdesc}[2][\py@classbadkey]{ \begin{fulllineitems} \ifx\@undefined#1\relax \memberline{#2} \else \def\py@thisclass{#1} \memberline{#2} \fi }{\end{fulllineitems}} % similar to {memberdesc}, but doesn't add to the index % (never actually uses the optional argument) \newcommand{\memberlineni}[2][\py@classbadkey]{\item[\bfcode{#2}]} \newenvironment{memberdescni}[2][\py@classbadkey]{ \begin{fulllineitems} \memberlineni{#2} }{\end{fulllineitems}} % For exceptions: -------------------------------------------------------- % \begin{excdesc}{name} % -- for constructor information, use excclassdesc instead \newenvironment{excdesc}[1]{ \begin{fulllineitems} \item[\strong{exception }\bfcode{#1}% \index{#1@{\py@idxcode{#1}} (exception in \py@thismodule)}] }{\end{fulllineitems}} % Module data or constants: ---------------------------------------------- % \begin{datadesc}{name} \newcommand{\dataline}[1]{% \datalineni{#1}\index{#1@{\py@idxcode{#1}} (data in \py@thismodule)}} \newenvironment{datadesc}[1]{ \begin{fulllineitems} \dataline{#1} }{\end{fulllineitems}} % similar to {datadesc}, but doesn't add to the index \newcommand{\datalineni}[1]{\item[\bfcode{#1}]\nopagebreak} \newenvironment{datadescni}[1]{ \begin{fulllineitems} \datalineni{#1} }{\end{fulllineitems}} % bytecode instruction --------------------------------------------------- % \begin{opcodedesc}{name}{var} % -- {var} may be {} \newenvironment{opcodedesc}[2]{ \begin{fulllineitems} \item[\bfcode{#1}\quad\var{#2}] }{\end{fulllineitems}} \newcommand{\nodename}[1]{\label{#1}} % For these commands, use \command{} to get the typography right, not % {\command}. This works better with the texinfo translation. \newcommand{\ABC}{{\sc abc}} \newcommand{\UNIX}{{\sc Unix}} \newcommand{\POSIX}{POSIX} \newcommand{\ASCII}{{\sc ascii}} \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}} \newcommand{\C}{C} \newcommand{\EOF}{{\sc eof}} \newcommand{\NULL}{\constant{NULL}} \newcommand{\infinity}{\ensuremath{\infty}} \newcommand{\plusminus}{\ensuremath{\pm}} % \guilabel{Start} \newcommand{\guilabel}[1]{\textsf{#1}} % \menuselection{Start \sub Programs \sub Python} \newcommand{\menuselection}[1]{\guilabel{{\def\sub{ \ensuremath{>} }#1}}} % Also for consistency: spell Python "Python", not "python"! % code is the most difficult one... \newcommand{\code}[1]{\textrm{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% \texttt{#1}}} \newcommand{\bfcode}[1]{\code{\bfseries#1}} % bold-faced code font \newcommand{\csimplemacro}[1]{\code{#1}} \newcommand{\kbd}[1]{\code{#1}} \newcommand{\samp}[1]{`\code{#1}'} \newcommand{\var}[1]{% \ifmmode% \hbox{\py@defaultsize\textrm{\textit{#1\/}}}% \else% \py@defaultsize\textrm{\textit{#1\/}}% \fi% } \renewcommand{\emph}[1]{{\em #1}} \newcommand{\dfn}[1]{\emph{#1}} \newcommand{\strong}[1]{{\bf #1}} % let's experiment with a new font: \newcommand{\file}[1]{`\filenq{#1}'} \newcommand{\filenq}[1]{{\py@smallsize\textsf{\let\e=\textbackslash#1}}} % Use this def/redef approach for \url{} since hyperref defined this already, % but only if we actually used hyperref: \ifpdf \newcommand{\url}[1]{{% \py@pdfstartlink% attr{ /Border [0 0 0] }% user{% /Subtype/Link% /A<<% /Type/Action% /S/URI% /URI(#1)% >>% }% \py@LinkColor% color of the link text \py@smallsize\sf #1% \py@NormalColor% Turn it back off; these are declarative \pdfendlink}% and don't appear bound to the current }% formatting "box". \else \newcommand{\url}[1]{\mbox{\py@smallsize\textsf{#1}}} \fi \newcommand{\email}[1]{{\py@smallsize\textsf{#1}}} \newcommand{\newsgroup}[1]{{\py@smallsize\textsf{#1}}} \newcommand{\py@varvars}[1]{{% {\let\unspecified=\py@unspecified% \let\moreargs=\py@moreargs% \var{#1}}}} % I'd really like to get rid of this! \newif\iftexi\texifalse % This is used to get l2h to put the copyright and abstract on % a separate HTML page. \newif\ifhtml\htmlfalse % These should be used for all references to identifiers which are % used to refer to instances of specific language constructs. See the % names for specific semantic assignments. % % For now, don't do anything really fancy with them; just use them as % logical markup. This might change in the future. % \newcommand{\module}[1]{\texttt{#1}} \newcommand{\keyword}[1]{\texttt{#1}} \newcommand{\exception}[1]{\texttt{#1}} \newcommand{\class}[1]{\texttt{#1}} \newcommand{\function}[1]{\texttt{#1}} \newcommand{\member}[1]{\texttt{#1}} \newcommand{\method}[1]{\texttt{#1}} \newcommand{\pytype}[1]{#1} % built-in Python type \newcommand{\cfunction}[1]{\texttt{#1}} \newcommand{\ctype}[1]{\texttt{#1}} % C struct or typedef name \newcommand{\cdata}[1]{\texttt{#1}} % C variable, typically global \newcommand{\mailheader}[1]{{\py@smallsize\textsf{#1:}}} \newcommand{\mimetype}[1]{{\py@smallsize\textsf{#1}}} % The \! is a "negative thin space" in math mode. \newcommand{\regexp}[1]{% {\tiny$^{^\lceil}\!\!$% {\py@defaultsize\code{#1}}% $\!\rfloor\!$% }} \newcommand{\envvar}[1]{% #1% \index{#1}% \index{environment variables!{#1}}% } \newcommand{\makevar}[1]{#1} % variable in a Makefile \newcommand{\character}[1]{\samp{#1}} % constants defined in Python modules or C headers, not language constants: \newcommand{\constant}[1]{\code{#1}} % manifest constant, not syntactic \newcommand{\manpage}[2]{{\emph{#1}(#2)}} \newcommand{\pep}[1]{PEP #1\index{Python Enhancement Proposals!PEP #1}} \newcommand{\rfc}[1]{RFC #1\index{RFC!RFC #1}} \newcommand{\program}[1]{\strong{#1}} \newcommand{\programopt}[1]{\strong{#1}} % Note that \longprogramopt provides the '--'! \newcommand{\longprogramopt}[1]{\strong{-{}-#1}} % \ulink{link text}{URL} \ifpdf \newcommand{\ulink}[2]{{% % For PDF, we *should* only generate a link when the URL is absolute. \py@pdfstartlink% attr{ /Border [0 0 0] }% user{% /Subtype/Link% /A<<% /Type/Action% /S/URI% /URI(#2)% >>% }% \py@LinkColor% color of the link text #1% \py@NormalColor% Turn it back off; these are declarative \pdfendlink}% and don't appear bound to the current }% formatting "box". \else \newcommand{\ulink}[2]{#1} \fi % cited titles: \citetitle{Title of Work} % online: \citetitle[url-to-resource]{Title of Work} \ifpdf \newcommand{\citetitle}[2][\py@modulebadkey]{% \ifx\py@modulebadkey#1\emph{#2}\else\ulink{\emph{#2}}{#1}\fi% } \else \newcommand{\citetitle}[2][URL]{\emph{#2}} \fi % This version is being checked in for the historical record; it shows % how I've managed to get some aspects of this to work. It will not % be used in practice, so a subsequent revision will change things % again. This version has problems, but shows how to do something % that proved more tedious than I'd expected, so I don't want to lose % the example completely. % \newcommand{\grammartoken}[1]{\texttt{#1}} \newenvironment{productionlist}[1][\py@badkey]{ \def\optional##1{{\Large[}##1{\Large]}} \def\production##1##2{\code{##1}&::=&\code{##2}\\} \def\productioncont##1{& &\code{##1}\\} \def\token##1{##1} \let\grammartoken=\token \parindent=2em \indent \begin{tabular}{lcl} }{% \end{tabular} } \newlength{\py@noticelength} \newcommand{\py@heavybox}{ \setlength{\fboxrule}{2pt} \setlength{\fboxsep}{7pt} \setlength{\py@noticelength}{\linewidth} \addtolength{\py@noticelength}{-2\fboxsep} \addtolength{\py@noticelength}{-2\fboxrule} \setlength{\shadowsize}{3pt} \Sbox \minipage{\py@noticelength} } \newcommand{\py@endheavybox}{ \endminipage \endSbox \fbox{\TheSbox} } % a 'note' is as plain as it gets: \newcommand{\py@noticelabel@note}{Note:} \newcommand{\py@noticestart@note}{} \newcommand{\py@noticeend@note}{} % a 'warning' gets more visible distinction: \newcommand{\py@noticelabel@warning}{Warning:} \newcommand{\py@noticestart@warning}{\py@heavybox} \newcommand{\py@noticeend@warning}{\py@endheavybox} \newenvironment{notice}[1][note]{ \def\py@noticetype{#1} \csname py@noticestart@#1\endcsname \par\strong{\csname py@noticelabel@#1\endcsname} }{\csname py@noticeend@\py@noticetype\endcsname} \newcommand{\note}[1]{\strong{\py@noticelabel@note} #1} \newcommand{\warning}[1]{\strong{\py@noticelabel@warning} #1} % Deprecation stuff. % Should be extended to allow an index / list of deprecated stuff. But % there's a lot of stuff that needs to be done to make that automatable. % % First parameter is the release number that deprecates the feature, the % second is the action the should be taken by users of the feature. % % Example: % \deprecated{1.5.1}{Use \method{frobnicate()} instead.} % \newcommand{\deprecated}[2]{% \strong{Deprecated since release #1.} #2\par} % New stuff. % This should be used to mark things which have been added to the % development tree but that aren't in the release, but are documented. % This allows release of documentation that already includes updated % descriptions. Place at end of descriptor environment. % % Example: % \versionadded{1.5.2} % \versionchanged[short explanation]{2.0} % \newcommand{\versionadded}[2][\py@badkey]{% \ifx\@undefined#1\relax% { New in version #2. }% \else% { New in version #2:\ #1. }% \fi% } \newcommand{\versionchanged}[2][\py@badkey]{% \ifx\@undefined#1\relax% { Changed in version #2. }% \else% { Changed in version #2:\ #1. }% \fi% } % Tables. % \newenvironment{tableii}[4]{% \begin{center}% \def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}% \begin{tabular}{#1}\strong{#3}&\strong{#4} \\* \hline% }{% \end{tabular}% \end{center}% } \newenvironment{longtableii}[4]{% \begin{center}% \def\lineii##1##2{\csname#2\endcsname{##1}&##2\\}% \begin{longtable}[c]{#1}\strong{#3}&\strong{#4} \\* \hline\endhead% }{% \end{longtable}% \end{center}% } \newenvironment{tableiii}[5]{% \begin{center}% \def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}% \begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5} \\% \hline% }{% \end{tabular}% \end{center}% } \newenvironment{longtableiii}[5]{% \begin{center}% \def\lineiii##1##2##3{\csname#2\endcsname{##1}&##2&##3\\}% \begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5} \\% \hline\endhead% }{% \end{longtable}% \end{center}% } \newenvironment{tableiv}[6]{% \begin{center}% \def\lineiv##1##2##3##4{\csname#2\endcsname{##1}&##2&##3&##4\\}% \begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6} \\% \hline% }{% \end{tabular}% \end{center}% } \newenvironment{longtableiv}[6]{% \begin{center}% \def\lineiv##1##2##3##4{\csname#2\endcsname{##1}&##2&##3&##4\\}% \begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}% \\% \hline\endhead% }{% \end{longtable}% \end{center}% } \newenvironment{tablev}[7]{% \begin{center}% \def\linev##1##2##3##4##5{\csname#2\endcsname{##1}&##2&##3&##4&##5\\}% \begin{tabular}{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}&\strong{#7} \\% \hline% }{% \end{tabular}% \end{center}% } \newenvironment{longtablev}[7]{% \begin{center}% \def\linev##1##2##3##4##5{\csname#2\endcsname{##1}&##2&##3&##4&##5\\}% \begin{longtable}[c]{#1}\strong{#3}&\strong{#4}&\strong{#5}&\strong{#6}&\strong{#7}% \\% \hline\endhead% }{% \end{longtable}% \end{center}% } % XXX Don't think we can use this yet, though it cleans up some % tedious markup. There's no equivalent for the HTML transform yet, % and that needs to exist. I don't know how to write it. % % This should really have something that makes it easier to bind a % table's ``Notes'' column and an associated tablenotes environment, % and generates the right magic for getting the numbers right in the % table. % % So this is quite incomplete. % \newcounter{py@tablenotescounter} \newenvironment{tablenotes}{% \noindent Notes: \par \setcounter{py@tablenotescounter}{0} \begin{list}{(\arabic{py@tablenotescounter})}% {\usecounter{py@tablenotescounter}} }{\end{list}} % Cross-referencing (AMK, new impl. FLD) % Sample usage: % \begin{seealso} % \seemodule{rand}{Uniform random number generator.}; % Module xref % \seetext{\emph{Encyclopedia Britannica}}. % Ref to a book % % % A funky case: module name contains '_'; have to supply an optional key % \seemodule[copyreg]{copy_reg}{Interface constructor registration for % \module{pickle}.} % \end{seealso} % % Note that the last parameter for \seemodule and \seetext should be complete % sentences and be terminated with the proper punctuation. \ifpdf \newcommand{\py@seemodule}[3][\py@modulebadkey]{% \par% \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% \begin{fulllineitems} \item[\py@linkToName{label-module-\py@modulekey}{Module \module{#2}} (section \ref{module-\py@modulekey}):] #3 \end{fulllineitems} } \else \newcommand{\py@seemodule}[3][\py@modulebadkey]{% \par% \ifx\py@modulebadkey#1\def\py@modulekey{#2}\else\def\py@modulekey{#1}\fi% \begin{fulllineitems} \item[Module \module{#2} (section \ref{module-\py@modulekey}):] #3 \end{fulllineitems} } \fi % \seelink{url}{link text}{why it's interesting} \newcommand{\py@seelink}[3]{% \par \begin{fulllineitems} \item[\ulink{#2}{#1}] #3 \end{fulllineitems} } % \seetitle[url]{title}{why it's interesting} \newcommand{\py@seetitle}[3][\py@modulebadkey]{% \par \begin{fulllineitems} \item[\citetitle{#2}] \ifx\py@modulebadkey#1\else \item[{\small{(\url{#1})}}] \fi #3 \end{fulllineitems} } % \seepep{number}{title}{why it's interesting} \newcommand{\py@seepep}[3]{% \par% \begin{fulllineitems} \item[\pep{#1}, ``\emph{#2}''] #3 \end{fulllineitems} } % \seerfc{number}{title}{why it's interesting} \newcommand{\py@seerfc}[3]{% \par% \begin{fulllineitems} \item[\rfc{#1}, ``\emph{#2}''] #3 \end{fulllineitems} } % \seeurl{url}{why it's interesting} \newcommand{\py@seeurl}[2]{% \par% \begin{fulllineitems} \item[\url{#1}] #2 \end{fulllineitems} } \newenvironment{seealso*}{ \par \def\seetext##1{\par{##1}} \let\seemodule=\py@seemodule \let\seepep=\py@seepep \let\seerfc=\py@seerfc \let\seetitle=\py@seetitle \let\seeurl=\py@seeurl \let\seelink=\py@seelink }{\par} \newenvironment{seealso}{ \par \strong{See Also:} \par \def\seetext##1{\par{##1}} \let\seemodule=\py@seemodule \let\seepep=\py@seepep \let\seerfc=\py@seerfc \let\seetitle=\py@seetitle \let\seeurl=\py@seeurl \let\seelink=\py@seelink }{\par} % Allow the Python release number to be specified independently of the % \date{}. This allows the date to reflect the document's date and % release to specify the Python release that is documented. % \newcommand{\py@release}{} \newcommand{\version}{} \newcommand{\shortversion}{} \newcommand{\releaseinfo}{} \newcommand{\releasename}{Release} \newcommand{\release}[1]{% \renewcommand{\py@release}{\releasename\space\version}% \renewcommand{\version}{#1}} \newcommand{\setshortversion}[1]{% \renewcommand{\shortversion}{#1}} \newcommand{\setreleaseinfo}[1]{% \renewcommand{\releaseinfo}{#1}} % Allow specification of the author's address separately from the % author's name. This can be used to format them differently, which % is a good thing. % \newcommand{\py@authoraddress}{} \newcommand{\authoraddress}[1]{\renewcommand{\py@authoraddress}{#1}} \let\developersaddress=\authoraddress \let\developer=\author \let\developers=\author % This sets up the fancy chapter headings that make the documents look % at least a little better than the usual LaTeX output. % \@ifundefined{ChTitleVar}{}{ \ChNameVar{\raggedleft\normalsize\py@HeaderFamily} \ChNumVar{\raggedleft \bfseries\Large\py@HeaderFamily} \ChTitleVar{\raggedleft \rm\Huge\py@HeaderFamily} % This creates chapter heads without the leading \vspace*{}: \def\@makechapterhead#1{% {\parindent \z@ \raggedright \normalfont \ifnum \c@secnumdepth >\m@ne \DOCH \fi \interlinepenalty\@M \DOTI{#1} } } } % Definition lists; requested by AMK for HOWTO documents. Probably useful % elsewhere as well, so keep in in the general style support. % \newenvironment{definitions}{% \begin{description}% \def\term##1{\item[##1]\mbox{}\\*[0mm]} }{% \end{description}% } % Tell TeX about pathological hyphenation cases: \hyphenation{Base-HTTP-Re-quest-Hand-ler} python-old-doctools-2.5.5/Doc/api/0000755000175000017500000000000011325610032015365 5ustar dokodokopython-old-doctools-2.5.5/Doc/api/refcounts.dat0000644000175000017500000013007610463372610020107 0ustar dokodoko# Created by Skip Montanaro . # Format: # function ':' type ':' [param name] ':' [refcount effect] ':' [comment] # If the param name slot is empty, that line corresponds to the function's # return value, otherwise it's the type of the named parameter. # The first line of a function block gives type/refcount information for the # function's return value. Successive lines with the same function name # correspond to the function's parameter list and appear in the order the # parameters appear in the function's prototype. # For readability, each function's lines are surrounded by a blank line. # The blocks are sorted alphabetically by function name. # Refcount behavior is given for all PyObject* types: 0 (no change), +1 # (increment) and -1 (decrement). A blank refcount field indicates the # parameter or function value is not a PyObject* and is therefore not # subject to reference counting. A special case for the value "null" # (without quotes) is used for functions which return a PyObject* type but # always return NULL. This is used by some of the PyErr_*() functions, in # particular. # XXX NOTE: the 0/+1/-1 refcount information for arguments is # confusing! Much more useful would be to indicate whether the # function "steals" a reference to the argument or not. Take for # example PyList_SetItem(list, i, item). This lists as a 0 change for # both the list and the item arguments. However, in fact it steals a # reference to the item argument! # The parameter names are as they appear in the API manual, not the source # code. PyBool_FromLong:PyObject*::+1: PyBool_FromLong:long:v:0: PyBuffer_FromObject:PyObject*::+1: PyBuffer_FromObject:PyObject*:base:+1: PyBuffer_FromObject:int:offset:: PyBuffer_FromObject:int:size:: PyBuffer_FromReadWriteObject:PyObject*::+1: PyBuffer_FromReadWriteObject:PyObject*:base:+1: PyBuffer_FromReadWriteObject:int:offset:: PyBuffer_FromReadWriteObject:int:size:: PyBuffer_FromMemory:PyObject*::+1: PyBuffer_FromMemory:void*:ptr:: PyBuffer_FromMemory:int:size:: PyBuffer_FromReadWriteMemory:PyObject*::+1: PyBuffer_FromReadWriteMemory:void*:ptr:: PyBuffer_FromReadWriteMemory:int:size:: PyBuffer_New:PyObject*::+1: PyBuffer_New:int:size:: PyCObject_AsVoidPtr:void*::: PyCObject_AsVoidPtr:PyObject*:self:0: PyCObject_FromVoidPtr:PyObject*::+1: PyCObject_FromVoidPtr:void*:cobj:: PyCObject_FromVoidPtr::void (* destr)(void* ):: PyCObject_FromVoidPtrAndDesc:PyObject*::+1: PyCObject_FromVoidPtrAndDesc:void*:cobj:: PyCObject_FromVoidPtrAndDesc:void*:desc:: PyCObject_FromVoidPtrAndDesc:void(*)(void*,void*):destr:: PyCObject_GetDesc:void*::: PyCObject_GetDesc:PyObject*:self:0: PyCell_New:PyObject*::+1: PyCell_New:PyObject*:ob:0: PyCell_GET:PyObject*::0: PyCell_GET:PyObject*:ob:0: PyCell_Get:PyObject*::+1: PyCell_Get:PyObject*:cell:0: PyCell_SET:void::: PyCell_SET:PyObject*:cell:0: PyCell_SET:PyObject*:value:0: PyCell_Set:int::: PyCell_Set:PyObject*:cell:0: PyCell_Set:PyObject*:value:0: PyCallIter_New:PyObject*::+1: PyCallIter_New:PyObject*:callable:: PyCallIter_New:PyObject*:sentinel:: PyCallable_Check:int::: PyCallable_Check:PyObject*:o:0: PyComplex_AsCComplex:Py_complex::: PyComplex_AsCComplex:PyObject*:op:0: PyComplex_Check:int::: PyComplex_Check:PyObject*:p:0: PyComplex_FromCComplex:PyObject*::+1: PyComplex_FromCComplex::Py_complex v:: PyComplex_FromDoubles:PyObject*::+1: PyComplex_FromDoubles::double real:: PyComplex_FromDoubles::double imag:: PyComplex_ImagAsDouble:double::: PyComplex_ImagAsDouble:PyObject*:op:0: PyComplex_RealAsDouble:double::: PyComplex_RealAsDouble:PyObject*:op:0: PyDate_FromDate:PyObject*::+1: PyDate_FromDate:int:year:: PyDate_FromDate:int:month:: PyDate_FromDate:int:day:: PyDate_FromTimestamp:PyObject*::+1: PyDate_FromTimestamp:PyObject*:args:0: PyDateTime_FromDateAndTime:PyObject*::+1: PyDateTime_FromDateAndTime:int:year:: PyDateTime_FromDateAndTime:int:month:: PyDateTime_FromDateAndTime:int:day:: PyDateTime_FromDateAndTime:int:hour:: PyDateTime_FromDateAndTime:int:minute:: PyDateTime_FromDateAndTime:int:second:: PyDateTime_FromDateAndTime:int:usecond:: PyDateTime_FromTimestamp:PyObject*::+1: PyDateTime_FromTimestamp:PyObject*:args:0: PyDelta_FromDSU:PyObject*::+1: PyDelta_FromDSU:int:days:: PyDelta_FromDSU:int:seconds:: PyDelta_FromDSU:int:useconds:: PyDescr_NewClassMethod:PyObject*::+1: PyDescr_NewClassMethod:PyTypeObject*:type:: PyDescr_NewClassMethod:PyMethodDef*:method:: PyDescr_NewGetSet:PyObject*::+1: PyDescr_NewGetSet:PyTypeObject*:type:: PyDescr_NewGetSet:PyGetSetDef*:getset:: PyDescr_NewMember:PyObject*::+1: PyDescr_NewMember:PyTypeObject*:type:: PyDescr_NewMember:PyMemberDef*:member:: PyDescr_NewMethod:PyObject*::+1: PyDescr_NewMethod:PyTypeObject*:type:: PyDescr_NewMethod:PyMethodDef*:meth:: PyDescr_NewWrapper:PyObject*::+1: PyDescr_NewWrapper:PyTypeObject*:type:: PyDescr_NewWrapper:struct wrapperbase*:base:: PyDescr_NewWrapper:void*:wrapped:: PyDict_Check:int::: PyDict_Check:PyObject*:p:0: PyDict_Clear:void::: PyDict_Clear:PyObject*:p:0: PyDict_DelItem:int::: PyDict_DelItem:PyObject*:p:0: PyDict_DelItem:PyObject*:key:0: PyDict_DelItemString:int::: PyDict_DelItemString:PyObject*:p:0: PyDict_DelItemString:char*:key:: PyDict_GetItem:PyObject*::0:0 PyDict_GetItem:PyObject*:p:0: PyDict_GetItem:PyObject*:key:0: PyDict_GetItemString:PyObject*::0: PyDict_GetItemString:PyObject*:p:0: PyDict_GetItemString:char*:key:: PyDict_Items:PyObject*::+1: PyDict_Items:PyObject*:p:0: PyDict_Keys:PyObject*::+1: PyDict_Keys:PyObject*:p:0: PyDict_New:PyObject*::+1: PyDict_Copy:PyObject*::+1: PyDict_Copy:PyObject*:p:0: PyDict_Next:int::: PyDict_Next:PyObject*:p:0: PyDict_Next:int:ppos:: PyDict_Next:PyObject**:pkey:0: PyDict_Next:PyObject**:pvalue:0: PyDict_SetItem:int::: PyDict_SetItem:PyObject*:p:0: PyDict_SetItem:PyObject*:key:+1: PyDict_SetItem:PyObject*:val:+1: PyDict_SetItemString:int::: PyDict_SetItemString:PyObject*:p:0: PyDict_SetItemString:char*:key:: PyDict_SetItemString:PyObject*:val:+1: PyDict_Size:int::: PyDict_Size:PyObject*:p:: PyDict_Values:PyObject*::+1: PyDict_Values:PyObject*:p:0: PyDictProxy_New:PyObject*::+1: PyDictProxy_New:PyObject*:dict:0: PyErr_BadArgument:int::: PyErr_BadInternalCall:void::: PyErr_CheckSignals:int::: PyErr_Clear:void::: PyErr_ExceptionMatches:int::: PyErr_ExceptionMatches:PyObject*:exc:0: PyErr_Fetch:void::: PyErr_Fetch:PyObject**:ptype:0: PyErr_Fetch:PyObject**:pvalue:0: PyErr_Fetch:PyObject**:ptraceback:0: PyErr_GivenExceptionMatches:int::: PyErr_GivenExceptionMatches:PyObject*:given:0: PyErr_GivenExceptionMatches:PyObject*:exc:0: PyErr_NewException:PyObject*::+1: PyErr_NewException:char*:name:: PyErr_NewException:PyObject*:base:0: PyErr_NewException:PyObject*:dict:0: PyErr_NoMemory:PyObject*::null: PyErr_NormalizeException:void::: PyErr_NormalizeException:PyObject**:exc::??? PyErr_NormalizeException:PyObject**:val::??? PyErr_NormalizeException:PyObject**:tb::??? PyErr_Occurred:PyObject*::0: PyErr_Print:void::: PyErr_Restore:void::: PyErr_Restore:PyObject*:type:-1: PyErr_Restore:PyObject*:value:-1: PyErr_Restore:PyObject*:traceback:-1: PyErr_SetExcFromWindowsErr:PyObject*::null: PyErr_SetExcFromWindowsErr:PyObject*:type:0: PyErr_SetExcFromWindowsErr:int:ierr:: PyErr_SetExcFromWindowsErrWithFilename:PyObject*::null: PyErr_SetExcFromWindowsErrWithFilename:PyObject*:type:0: PyErr_SetExcFromWindowsErrWithFilename:int:ierr:: PyErr_SetExcFromWindowsErrWithFilename:char*:filename:: PyErr_SetFromErrno:PyObject*::null: PyErr_SetFromErrno:PyObject*:type:0: PyErr_SetFromErrnoWithFilename:PyObject*::null: PyErr_SetFromErrnoWithFilename:PyObject*:type:0: PyErr_SetFromErrnoWithFilename:char*:filename:: PyErr_SetFromWindowsErr:PyObject*::null: PyErr_SetFromWindowsErr:int:ierr:: PyErr_SetFromWindowsErrWithFilename:PyObject*::null: PyErr_SetFromWindowsErrWithFilename:int:ierr:: PyErr_SetFromWindowsErrWithFilename:char*:filename:: PyErr_SetInterrupt:void::: PyErr_SetNone:void::: PyErr_SetNone:PyObject*:type:+1: PyErr_SetObject:void::: PyErr_SetObject:PyObject*:type:+1: PyErr_SetObject:PyObject*:value:+1: PyErr_SetString:void::: PyErr_SetString:PyObject*:type:+1: PyErr_SetString:char*:message:: PyErr_Format:PyObject*::null: PyErr_Format:PyObject*:exception:+1: PyErr_Format:char*:format:: PyErr_Format::...:: PyErr_Warn:int::: PyErr_Warn:PyObject*:category:0: PyErr_Warn:char*:message:: PyErr_WarnEx:int::: PyErr_WarnEx:PyObject*:category:0: PyErr_WarnEx:const char*:message:: PyErr_WarnEx:Py_ssize_t:stack_level:: PyEval_AcquireLock:void::: PyEval_AcquireThread:void::: PyEval_AcquireThread:PyThreadState*:tstate:: PyEval_InitThreads:void::: PyEval_ReleaseLock:void::: PyEval_ReleaseThread:void::: PyEval_ReleaseThread:PyThreadState*:tstate:: PyEval_RestoreThread:void::: PyEval_RestoreThread:PyThreadState*:tstate:: PyEval_SaveThread:PyThreadState*::: PyEval_EvalCode:PyObject*::+1: PyEval_EvalCode:PyCodeObject*:co:0: PyEval_EvalCode:PyObject*:globals:0: PyEval_EvalCode:PyObject*:locals:0: PyFile_AsFile:FILE*::: PyFile_AsFile:PyFileObject*:p:0: PyFile_Check:int::: PyFile_Check:PyObject*:p:0: PyFile_FromFile:PyObject*::+1: PyFile_FromFile:FILE*:fp:: PyFile_FromFile:char*:name:: PyFile_FromFile:char*:mode:: PyFile_FromFile:int(*:close):: PyFile_FromString:PyObject*::+1: PyFile_FromString:char*:name:: PyFile_FromString:char*:mode:: PyFile_GetLine:PyObject*::+1: PyFile_GetLine:PyObject*:p:: PyFile_GetLine:int:n:: PyFile_Name:PyObject*::0: PyFile_Name:PyObject*:p:0: PyFile_SetBufSize:void::: PyFile_SetBufSize:PyFileObject*:p:0: PyFile_SetBufSize:int:n:: PyFile_SoftSpace:int::: PyFile_SoftSpace:PyFileObject*:p:0: PyFile_SoftSpace:int:newflag:: PyFile_WriteObject:int::: PyFile_WriteObject:PyObject*:obj:0: PyFile_WriteObject:PyFileObject*:p:0: PyFile_WriteObject:int:flags:: PyFile_WriteString:int::: PyFile_WriteString:const char*:s:: PyFile_WriteString:PyFileObject*:p:0: PyFile_WriteString:int:flags:: PyFloat_AS_DOUBLE:double::: PyFloat_AS_DOUBLE:PyObject*:pyfloat:0: PyFloat_AsDouble:double::: PyFloat_AsDouble:PyObject*:pyfloat:0: PyFloat_Check:int::: PyFloat_Check:PyObject*:p:0: PyFloat_FromDouble:PyObject*::+1: PyFloat_FromDouble:double:v:: PyFloat_FromString:PyObject*::+1: PyFloat_FromString:PyObject*:str:0: PyFloat_FromString:char**:pend:0:ignored PyFrozenSet_New:PyObject*::+1: PyFrozenSet_New:PyObject*:iterable:0: PyFunction_GetClosure:PyObject*::0: PyFunction_GetClosure:PyObject*:op:0: PyFunction_GetCode:PyObject*::0: PyFunction_GetCode:PyObject*:op:0: PyFunction_GetDefaults:PyObject*::0: PyFunction_GetDefaults:PyObject*:op:0: PyFunction_GetGlobals:PyObject*::0: PyFunction_GetGlobals:PyObject*:op:0: PyFunction_GetModule:PyObject*::0: PyFunction_GetModule:PyObject*:op:0: PyFunction_New:PyObject*::+1: PyFunction_New:PyObject*:code:+1: PyFunction_New:PyObject*:globals:+1: PyFunction_SetClosure:int::: PyFunction_SetClosure:PyObject*:op:0: PyFunction_SetClosure:PyObject*:closure:+1: PyFunction_SetDefaults:int::: PyFunction_SetDefaults:PyObject*:op:0: PyFunction_SetDefaults:PyObject*:defaults:+1: PyGen_New:PyObject*::+1: PyGen_New:PyFrameObject*:frame:0: Py_InitModule:PyObject*::0: Py_InitModule:char*:name:: Py_InitModule:PyMethodDef[]:methods:: Py_InitModule3:PyObject*::0: Py_InitModule3:char*:name:: Py_InitModule3:PyMethodDef[]:methods:: Py_InitModule3:char*:doc:: Py_InitModule4:PyObject*::0: Py_InitModule4:char*:name:: Py_InitModule4:PyMethodDef[]:methods:: Py_InitModule4:char*:doc:: Py_InitModule4:PyObject*:self:: Py_InitModule4:int:apiver::usually provided by Py_InitModule or Py_InitModule3 PyImport_AddModule:PyObject*::0:reference borrowed from sys.modules PyImport_AddModule:char*:name:: PyImport_Cleanup:void::: PyImport_ExecCodeModule:PyObject*::+1: PyImport_ExecCodeModule:char*:name:: PyImport_ExecCodeModule:PyObject*:co:0: PyImport_GetMagicNumber:long::: PyImport_GetModuleDict:PyObject*::0: PyImport_Import:PyObject*::+1: PyImport_Import:PyObject*:name:0: PyImport_ImportFrozenModule:int::: PyImport_ImportFrozenModule:char*::: PyImport_ImportModule:PyObject*::+1: PyImport_ImportModule:char*:name:: PyImport_ImportModuleEx:PyObject*::+1: PyImport_ImportModuleEx:char*:name:: PyImport_ImportModuleEx:PyObject*:globals:0:??? PyImport_ImportModuleEx:PyObject*:locals:0:??? PyImport_ImportModuleEx:PyObject*:fromlist:0:??? PyImport_ReloadModule:PyObject*::+1: PyImport_ReloadModule:PyObject*:m:0: PyInstance_New:PyObject*::+1: PyInstance_New:PyObject*:klass:+1: PyInstance_New:PyObject*:arg:0: PyInstance_New:PyObject*:kw:0: PyInstance_NewRaw:PyObject*::+1: PyInstance_NewRaw:PyObject*:klass:+1: PyInstance_NewRaw:PyObject*:dict:+1: PyInt_AS_LONG:long::: PyInt_AS_LONG:PyIntObject*:io:0: PyInt_AsLong:long::: PyInt_AsLong:PyObject*:io:0: PyInt_Check:int::: PyInt_Check:PyObject*:op:0: PyInt_FromLong:PyObject*::+1: PyInt_FromLong:long:ival:: PyInt_FromString:PyObject*::+1: PyInt_FromString:char*:str:0: PyInt_FromString:char**:pend:0: PyInt_FromString:int:base:0: PyInt_FromSsize_t:PyObject*::+1: PyInt_FromSsize_t:Py_ssize_t:ival:: PyInt_GetMax:long::: PyInterpreterState_Clear:void::: PyInterpreterState_Clear:PyInterpreterState*:interp:: PyInterpreterState_Delete:void::: PyInterpreterState_Delete:PyInterpreterState*:interp:: PyInterpreterState_New:PyInterpreterState*::: PyIter_Check:int:o:0: PyIter_Next:PyObject*::+1: PyIter_Next:PyObject*:o:0: PyList_Append:int::: PyList_Append:PyObject*:list:0: PyList_Append:PyObject*:item:+1: PyList_AsTuple:PyObject*::+1: PyList_AsTuple:PyObject*:list:0: PyList_Check:int::: PyList_Check:PyObject*:p:0: PyList_GET_ITEM:PyObject*::0: PyList_GET_ITEM:PyObject*:list:0: PyList_GET_ITEM:int:i:0: PyList_GET_SIZE:int::: PyList_GET_SIZE:PyObject*:list:0: PyList_GetItem:PyObject*::0: PyList_GetItem:PyObject*:list:0: PyList_GetItem:int:index:: PyList_GetSlice:PyObject*::+1: PyList_GetSlice:PyObject*:list:0: PyList_GetSlice:int:low:: PyList_GetSlice:int:high:: PyList_Insert:int::: PyList_Insert:PyObject*:list:0: PyList_Insert:int:index:: PyList_Insert:PyObject*:item:+1: PyList_New:PyObject*::+1: PyList_New:int:len:: PyList_Reverse:int::: PyList_Reverse:PyObject*:list:0: PyList_SET_ITEM:void::: PyList_SET_ITEM:PyObject*:list:0: PyList_SET_ITEM:int:i:: PyList_SET_ITEM:PyObject*:o:0: PyList_SetItem:int::: PyList_SetItem:PyObject*:list:0: PyList_SetItem:int:index:: PyList_SetItem:PyObject*:item:0: PyList_SetSlice:int::: PyList_SetSlice:PyObject*:list:0: PyList_SetSlice:int:low:: PyList_SetSlice:int:high:: PyList_SetSlice:PyObject*:itemlist:0:but increfs its elements? PyList_Size:int::: PyList_Size:PyObject*:list:0: PyList_Sort:int::: PyList_Sort:PyObject*:list:0: PyLong_AsDouble:double::: PyLong_AsDouble:PyObject*:pylong:0: PyLong_AsLong:long::: PyLong_AsLong:PyObject*:pylong:0: PyLong_AsUnsignedLong:unsigned long::: PyLong_AsUnsignedLong:PyObject*:pylong:0: PyLong_Check:int::: PyLong_Check:PyObject*:p:0: PyLong_FromDouble:PyObject*::+1: PyLong_FromDouble:double:v:: PyLong_FromLong:PyObject*::+1: PyLong_FromLong:long:v:: PyLong_FromLongLong:PyObject*::+1: PyLong_FromLongLong:long long:v:: PyLong_FromUnsignedLongLong:PyObject*::+1: PyLong_FromUnsignedLongLong:unsigned long long:v:: PyLong_FromString:PyObject*::+1: PyLong_FromString:char*:str:: PyLong_FromString:char**:pend:: PyLong_FromString:int:base:: PyLong_FromUnicode:PyObject*::+1: PyLong_FromUnicode:Py_UNICODE:u:: PyLong_FromUnicode:int:length:: PyLong_FromUnicode:int:base:: PyLong_FromUnsignedLong:PyObject*::+1: PyLong_FromUnsignedLong:unsignedlong:v:: PyLong_FromVoidPtr:PyObject*::+1: PyLong_FromVoidPtr:void*:p:: PyMapping_Check:int::: PyMapping_Check:PyObject*:o:0: PyMapping_DelItem:int::: PyMapping_DelItem:PyObject*:o:0: PyMapping_DelItem:PyObject*:key:0: PyMapping_DelItemString:int::: PyMapping_DelItemString:PyObject*:o:0: PyMapping_DelItemString:char*:key:: PyMapping_GetItemString:PyObject*::+1: PyMapping_GetItemString:PyObject*:o:0: PyMapping_GetItemString:char*:key:: PyMapping_HasKey:int::: PyMapping_HasKey:PyObject*:o:0: PyMapping_HasKey:PyObject*:key:: PyMapping_HasKeyString:int::: PyMapping_HasKeyString:PyObject*:o:0: PyMapping_HasKeyString:char*:key:: PyMapping_Items:PyObject*::+1: PyMapping_Items:PyObject*:o:0: PyMapping_Keys:PyObject*::+1: PyMapping_Keys:PyObject*:o:0: PyMapping_Length:int::: PyMapping_Length:PyObject*:o:0: PyMapping_SetItemString:int::: PyMapping_SetItemString:PyObject*:o:0: PyMapping_SetItemString:char*:key:: PyMapping_SetItemString:PyObject*:v:+1: PyMapping_Values:PyObject*::+1: PyMapping_Values:PyObject*:o:0: PyMarshal_ReadLastObjectFromFile:PyObject*::+1: PyMarshal_ReadLastObjectFromFile:FILE*:file:: PyMarshal_ReadObjectFromFile:PyObject*::+1: PyMarshal_ReadObjectFromFile:FILE*:file:: PyMarshal_ReadObjectFromString:PyObject*::+1: PyMarshal_ReadObjectFromString:char*:string:: PyMarshal_ReadObjectFromString:int:len:: PyMarshal_WriteObjectToString:PyObject*::+1: PyMarshal_WriteObjectToString:PyObject*:value:0: PyMethod_Class:PyObject*::0: PyMethod_Class:PyObject*:im:0: PyMethod_Function:PyObject*::0: PyMethod_Function:PyObject*:im:0: PyMethod_GET_CLASS:PyObject*::0: PyMethod_GET_CLASS:PyObject*:im:0: PyMethod_GET_FUNCTION:PyObject*::0: PyMethod_GET_FUNCTION:PyObject*:im:0: PyMethod_GET_SELF:PyObject*::0: PyMethod_GET_SELF:PyObject*:im:0: PyMethod_New:PyObject*::+1: PyMethod_New:PyObject*:func:0: PyMethod_New:PyObject*:self:0: PyMethod_New:PyObject*:class:0: PyMethod_Self:PyObject*::0: PyMethod_Self:PyObject*:im:0: PyModule_GetDict:PyObject*::0: PyModule_GetDict::PyObject* module:0: PyModule_GetFilename:char*::: PyModule_GetFilename:PyObject*:module:0: PyModule_GetName:char*::: PyModule_GetName:PyObject*:module:0: PyModule_New:PyObject*::+1: PyModule_New::char* name:: PyNumber_Absolute:PyObject*::+1: PyNumber_Absolute:PyObject*:o:0: PyNumber_Add:PyObject*::+1: PyNumber_Add:PyObject*:o1:0: PyNumber_Add:PyObject*:o2:0: PyNumber_And:PyObject*::+1: PyNumber_And:PyObject*:o1:0: PyNumber_And:PyObject*:o2:0: PyNumber_Check:PyObject*:o:0: PyNumber_Check:int::: PyNumber_Coerce:int::: PyNumber_Coerce:PyObject**:p1:+1: PyNumber_Coerce:PyObject**:p2:+1: PyNumber_Divide:PyObject*::+1: PyNumber_Divide:PyObject*:o1:0: PyNumber_Divide:PyObject*:o2:0: PyNumber_Divmod:PyObject*::+1: PyNumber_Divmod:PyObject*:o1:0: PyNumber_Divmod:PyObject*:o2:0: PyNumber_Float:PyObject*::+1: PyNumber_Float:PyObject*:o:0: PyNumber_FloorDivide:PyObject*::+1: PyNumber_FloorDivide:PyObject*:v:0: PyNumber_FloorDivide:PyObject*:w:0: PyNumber_InPlaceAdd:PyObject*::+1: PyNumber_InPlaceAdd:PyObject*:v:0: PyNumber_InPlaceAdd:PyObject*:w:0: PyNumber_InPlaceAnd:PyObject*::+1: PyNumber_InPlaceAnd:PyObject*:v:0: PyNumber_InPlaceAnd:PyObject*:w:0: PyNumber_InPlaceDivide:PyObject*::+1: PyNumber_InPlaceDivide:PyObject*:v:0: PyNumber_InPlaceDivide:PyObject*:w:0: PyNumber_InPlaceFloorDivide:PyObject*::+1: PyNumber_InPlaceFloorDivide:PyObject*:v:0: PyNumber_InPlaceFloorDivide:PyObject*:w:0: PyNumber_InPlaceLshift:PyObject*::+1: PyNumber_InPlaceLshift:PyObject*:v:0: PyNumber_InPlaceLshift:PyObject*:w:0: PyNumber_InPlaceMultiply:PyObject*::+1: PyNumber_InPlaceMultiply:PyObject*:v:0: PyNumber_InPlaceMultiply:PyObject*:w:0: PyNumber_InPlaceOr:PyObject*::+1: PyNumber_InPlaceOr:PyObject*:v:0: PyNumber_InPlaceOr:PyObject*:w:0: PyNumber_InPlacePower:PyObject*::+1: PyNumber_InPlacePower:PyObject*:v:0: PyNumber_InPlacePower:PyObject*:w:0: PyNumber_InPlacePower:PyObject*:z:0: PyNumber_InPlaceRemainder:PyObject*::+1: PyNumber_InPlaceRemainder:PyObject*:v:0: PyNumber_InPlaceRemainder:PyObject*:w:0: PyNumber_InPlaceRshift:PyObject*::+1: PyNumber_InPlaceRshift:PyObject*:v:0: PyNumber_InPlaceRshift:PyObject*:w:0: PyNumber_InPlaceSubtract:PyObject*::+1: PyNumber_InPlaceSubtract:PyObject*:v:0: PyNumber_InPlaceSubtract:PyObject*:w:0: PyNumber_InPlaceTrueDivide:PyObject*::+1: PyNumber_InPlaceTrueDivide:PyObject*:v:0: PyNumber_InPlaceTrueDivide:PyObject*:w:0: PyNumber_InPlaceXor:PyObject*::+1: PyNumber_InPlaceXor:PyObject*:v:0: PyNumber_InPlaceXor:PyObject*:w:0: PyNumber_Int:PyObject*::+1: PyNumber_Int:PyObject*:o:0: PyNumber_Invert:PyObject*::+1: PyNumber_Invert:PyObject*:o:0: PyNumber_Long:PyObject*::+1: PyNumber_Long:PyObject*:o:0: PyNumber_Lshift:PyObject*::+1: PyNumber_Lshift:PyObject*:o1:0: PyNumber_Lshift:PyObject*:o2:0: PyNumber_Multiply:PyObject*::+1: PyNumber_Multiply:PyObject*:o1:0: PyNumber_Multiply:PyObject*:o2:0: PyNumber_Negative:PyObject*::+1: PyNumber_Negative:PyObject*:o:0: PyNumber_Or:PyObject*::+1: PyNumber_Or:PyObject*:o1:0: PyNumber_Or:PyObject*:o2:0: PyNumber_Positive:PyObject*::+1: PyNumber_Positive:PyObject*:o:0: PyNumber_Power:PyObject*::+1: PyNumber_Power:PyObject*:o1:0: PyNumber_Power:PyObject*:o2:0: PyNumber_Power:PyObject*:o3:0: PyNumber_Remainder:PyObject*::+1: PyNumber_Remainder:PyObject*:o1:0: PyNumber_Remainder:PyObject*:o2:0: PyNumber_Rshift:PyObject*::+1: PyNumber_Rshift:PyObject*:o1:0: PyNumber_Rshift:PyObject*:o2:0: PyNumber_Subtract:PyObject*::+1: PyNumber_Subtract:PyObject*:o1:0: PyNumber_Subtract:PyObject*:o2:0: PyNumber_TrueDivide:PyObject*::+1: PyNumber_TrueDivide:PyObject*:v:0: PyNumber_TrueDivide:PyObject*:w:0: PyNumber_Xor:PyObject*::+1: PyNumber_Xor:PyObject*:o1:0: PyNumber_Xor:PyObject*:o2:0: PyOS_GetLastModificationTime:long::: PyOS_GetLastModificationTime:char*:filename:: PyObject_AsFileDescriptor:int::: PyObject_AsFileDescriptor:PyObject*:o:0: PyObject_Call:PyObject*::+1: PyObject_Call:PyObject*:callable_object:0: PyObject_Call:PyObject*:args:0: PyObject_Call:PyObject*:kw:0: PyObject_CallFunction:PyObject*::+1: PyObject_CallFunction:PyObject*:callable_object:0: PyObject_CallFunction:char*:format:: PyObject_CallFunction::...:: PyObject_CallFunctionObjArgs:PyObject*::+1: PyObject_CallFunctionObjArgs:PyObject*:callable:0: PyObject_CallFunctionObjArgs::...:: PyObject_CallMethod:PyObject*::+1: PyObject_CallMethod:PyObject*:o:0: PyObject_CallMethod:char*:m:: PyObject_CallMethod:char*:format:: PyObject_CallMethod::...:: PyObject_CallMethodObjArgs:PyObject*::+1: PyObject_CallMethodObjArgs:PyObject*:o:0: PyObject_CallMethodObjArgs:char*:name:: PyObject_CallMethodObjArgs::...:: PyObject_CallObject:PyObject*::+1: PyObject_CallObject:PyObject*:callable_object:0: PyObject_CallObject:PyObject*:args:0: PyObject_Cmp:int::: PyObject_Cmp:PyObject*:o1:0: PyObject_Cmp:PyObject*:o2:0: PyObject_Cmp:int*:result:: PyObject_Compare:int::: PyObject_Compare:PyObject*:o1:0: PyObject_Compare:PyObject*:o2:0: PyObject_DelAttr:int::: PyObject_DelAttr:PyObject*:o:0: PyObject_DelAttr:PyObject*:attr_name:0: PyObject_DelAttrString:int::: PyObject_DelAttrString:PyObject*:o:0: PyObject_DelAttrString:char*:attr_name:: PyObject_DelItem:int::: PyObject_DelItem:PyObject*:o:0: PyObject_DelItem:PyObject*:key:0: PyObject_Dir:PyObject*::+1: PyObject_Dir:PyObject*:o:0: PyObject_GetAttr:PyObject*::+1: PyObject_GetAttr:PyObject*:o:0: PyObject_GetAttr:PyObject*:attr_name:0: PyObject_GetAttrString:PyObject*::+1: PyObject_GetAttrString:PyObject*:o:0: PyObject_GetAttrString:char*:attr_name:: PyObject_GetItem:PyObject*::+1: PyObject_GetItem:PyObject*:o:0: PyObject_GetItem:PyObject*:key:0: PyObject_GetIter:PyObject*::+1: PyObject_GetIter:PyObject*:o:0: PyObject_HasAttr:int::: PyObject_HasAttr:PyObject*:o:0: PyObject_HasAttr:PyObject*:attr_name:0: PyObject_HasAttrString:int::: PyObject_HasAttrString:PyObject*:o:0: PyObject_HasAttrString:char*:attr_name:0: PyObject_Hash:int::: PyObject_Hash:PyObject*:o:0: PyObject_IsTrue:int::: PyObject_IsTrue:PyObject*:o:0: PyObject_Init:PyObject*::0: PyObject_Init:PyObject*:op:0: PyObject_InitVar:PyVarObject*::0: PyObject_InitVar:PyVarObject*:op:0: PyObject_Length:int::: PyObject_Length:PyObject*:o:0: PyObject_NEW:PyObject*::+1: PyObject_New:PyObject*::+1: PyObject_NEW_VAR:PyObject*::+1: PyObject_NewVar:PyObject*::+1: PyObject_Print:int::: PyObject_Print:PyObject*:o:0: PyObject_Print:FILE*:fp:: PyObject_Print:int:flags:: PyObject_Repr:PyObject*::+1: PyObject_Repr:PyObject*:o:0: PyObject_RichCompare:PyObject*::+1: PyObject_RichCompare:PyObject*:o1:0: PyObject_RichCompare:PyObject*:o2:0: PyObject_RichCompare:int:opid:: PyObject_RichCompareBool:int::: PyObject_RichCompareBool:PyObject*:o1:0: PyObject_RichCompareBool:PyObject*:o2:0: PyObject_RichCompareBool:int:opid:: PyObject_SetAttr:int::: PyObject_SetAttr:PyObject*:o:0: PyObject_SetAttr:PyObject*:attr_name:0: PyObject_SetAttr:PyObject*:v:+1: PyObject_SetAttrString:int::: PyObject_SetAttrString:PyObject*:o:0: PyObject_SetAttrString:char*:attr_name:: PyObject_SetAttrString:PyObject*:v:+1: PyObject_SetItem:int::: PyObject_SetItem:PyObject*:o:0: PyObject_SetItem:PyObject*:key:0: PyObject_SetItem:PyObject*:v:+1: PyObject_Str:PyObject*::+1: PyObject_Str:PyObject*:o:0: PyObject_Type:PyObject*::+1: PyObject_Type:PyObject*:o:0: PyObject_Unicode:PyObject*::+1: PyObject_Unicode:PyObject*:o:0: PyParser_SimpleParseFile:struct _node*::: PyParser_SimpleParseFile:FILE*:fp:: PyParser_SimpleParseFile:char*:filename:: PyParser_SimpleParseFile:int:start:: PyParser_SimpleParseString:struct _node*::: PyParser_SimpleParseString:char*:str:: PyParser_SimpleParseString:int:start:: PyRun_AnyFile:int::: PyRun_AnyFile:FILE*:fp:: PyRun_AnyFile:char*:filename:: PyRun_File:PyObject*::+1:??? -- same as eval_code2() PyRun_File:FILE*:fp:: PyRun_File:char*:filename:: PyRun_File:int:start:: PyRun_File:PyObject*:globals:0: PyRun_File:PyObject*:locals:0: PyRun_FileEx:PyObject*::+1:??? -- same as eval_code2() PyRun_FileEx:FILE*:fp:: PyRun_FileEx:char*:filename:: PyRun_FileEx:int:start:: PyRun_FileEx:PyObject*:globals:0: PyRun_FileEx:PyObject*:locals:0: PyRun_FileEx:int:closeit:: PyRun_FileFlags:PyObject*::+1:??? -- same as eval_code2() PyRun_FileFlags:FILE*:fp:: PyRun_FileFlags:char*:filename:: PyRun_FileFlags:int:start:: PyRun_FileFlags:PyObject*:globals:0: PyRun_FileFlags:PyObject*:locals:0: PyRun_FileFlags:PyCompilerFlags*:flags:: PyRun_FileExFlags:PyObject*::+1:??? -- same as eval_code2() PyRun_FileExFlags:FILE*:fp:: PyRun_FileExFlags:char*:filename:: PyRun_FileExFlags:int:start:: PyRun_FileExFlags:PyObject*:globals:0: PyRun_FileExFlags:PyObject*:locals:0: PyRun_FileExFlags:int:closeit:: PyRun_FileExFlags:PyCompilerFlags*:flags:: PyRun_InteractiveLoop:int::: PyRun_InteractiveLoop:FILE*:fp:: PyRun_InteractiveLoop:char*:filename:: PyRun_InteractiveOne:int::: PyRun_InteractiveOne:FILE*:fp:: PyRun_InteractiveOne:char*:filename:: PyRun_SimpleFile:int::: PyRun_SimpleFile:FILE*:fp:: PyRun_SimpleFile:char*:filename:: PyRun_SimpleString:int::: PyRun_SimpleString:char*:command:: PyRun_String:PyObject*::+1:??? -- same as eval_code2() PyRun_String:char*:str:: PyRun_String:int:start:: PyRun_String:PyObject*:globals:0: PyRun_String:PyObject*:locals:0: PyRun_StringFlags:PyObject*::+1:??? -- same as eval_code2() PyRun_StringFlags:char*:str:: PyRun_StringFlags:int:start:: PyRun_StringFlags:PyObject*:globals:0: PyRun_StringFlags:PyObject*:locals:0: PyRun_StringFlags:PyCompilerFlags*:flags:: PySeqIter_New:PyObject*::+1: PySeqIter_New:PyObject*:seq:: PySequence_Check:int::: PySequence_Check:PyObject*:o:0: PySequence_Concat:PyObject*::+1: PySequence_Concat:PyObject*:o1:0: PySequence_Concat:PyObject*:o2:0: PySequence_Count:int::: PySequence_Count:PyObject*:o:0: PySequence_Count:PyObject*:value:0: PySequence_DelItem:int::: PySequence_DelItem:PyObject*:o:0: PySequence_DelItem:int:i:: PySequence_DelSlice:int::: PySequence_DelSlice:PyObject*:o:0: PySequence_DelSlice:int:i1:: PySequence_DelSlice:int:i2:: PySequence_Fast:PyObject*::+1: PySequence_Fast:PyObject*:v:0: PySequence_Fast:const char*:m:: PySequence_Fast_GET_ITEM:PyObject*::0: PySequence_Fast_GET_ITEM:PyObject*:o:0: PySequence_Fast_GET_ITEM:int:i:: PySequence_GetItem:PyObject*::+1: PySequence_GetItem:PyObject*:o:0: PySequence_GetItem:int:i:: PySequence_GetSlice:PyObject*::+1: PySequence_GetSlice:PyObject*:o:0: PySequence_GetSlice:int:i1:: PySequence_GetSlice:int:i2:: PySequence_In:int::: PySequence_In:PyObject*:o:0: PySequence_In:PyObject*:value:0: PySequence_Index:int::: PySequence_Index:PyObject*:o:0: PySequence_Index:PyObject*:value:0: PySequence_InPlaceConcat:PyObject*::+1: PySequence_InPlaceConcat:PyObject*:s:0: PySequence_InPlaceConcat:PyObject*:o:0: PySequence_InPlaceRepeat:PyObject*::+1: PySequence_InPlaceRepeat:PyObject*:s:0: PySequence_InPlaceRepeat:PyObject*:o:0: PySequence_ITEM:PyObject*::+1: PySequence_ITEM:PyObject*:o:0: PySequence_ITEM:int:i:: PySequence_Repeat:PyObject*::+1: PySequence_Repeat:PyObject*:o:0: PySequence_Repeat:int:count:: PySequence_SetItem:int::: PySequence_SetItem:PyObject*:o:0: PySequence_SetItem:int:i:: PySequence_SetItem:PyObject*:v:+1: PySequence_SetSlice:int::: PySequence_SetSlice:PyObject*:o:0: PySequence_SetSlice:int:i1:: PySequence_SetSlice:int:i2:: PySequence_SetSlice:PyObject*:v:+1: PySequence_List:PyObject*::+1: PySequence_List:PyObject*:o:0: PySequence_Tuple:PyObject*::+1: PySequence_Tuple:PyObject*:o:0: PySet_Append:int::: PySet_Append:PyObject*:set:0: PySet_Append:PyObject*:key:+1: PySet_Contains:int::: PySet_Contains:PyObject*:anyset:0: PySet_Contains:PyObject*:key:0: PySet_Discard:int::: PySet_Discard:PyObject*:set:0: PySet_Discard:PyObject*:key:-1:no effect if key not found PySet_New:PyObject*::+1: PySet_New:PyObject*:iterable:0: PySet_Pop:PyObject*::+1:or returns NULL and raises KeyError if set is empty PySet_Pop:PyObject*:set:0: PySet_Size:int::: PySet_Size:PyObject*:anyset:0: PySlice_Check:int::: PySlice_Check:PyObject*:ob:0: PySlice_New:PyObject*::+1: PySlice_New:PyObject*:start:0: PySlice_New:PyObject*:stop:0: PySlice_New:PyObject*:step:0: PyString_AS_STRING:char*::: PyString_AS_STRING:PyObject*:string:0: PyString_AsDecodedObject:PyObject*::+1: PyString_AsDecodedObject:PyObject*:str:0: PyString_AsDecodedObject:const char*:encoding:: PyString_AsDecodedObject:const char*:errors:: PyString_AsEncodedObject:PyObject*::+1: PyString_AsEncodedObject:PyObject*:str:0: PyString_AsEncodedObject:const char*:encoding:: PyString_AsEncodedObject:const char*:errors:: PyString_AsString:char*::: PyString_AsString:PyObject*:string:0: PyString_AsStringAndSize:int::: PyString_AsStringAndSize:PyObject*:obj:0: PyString_AsStringAndSize:char**:buffer:: PyString_AsStringAndSize:int*:length:: PyString_Check:int::: PyString_Check:PyObject*:o:0: PyString_Concat:void::: PyString_Concat:PyObject**:string:0:??? -- replaces w/ new string or NULL PyString_Concat:PyObject*:newpart:0: PyString_ConcatAndDel:void::: PyString_ConcatAndDel:PyObject**:string:0:??? -- replaces w/ new string or NULL PyString_ConcatAndDel:PyObject*:newpart:-1: PyString_Format:PyObject*::+1: PyString_Format:PyObject*:format:0: PyString_Format:PyObject*:args:0: PyString_FromString:PyObject*::+1: PyString_FromString:const char*:v:: PyString_FromStringAndSize:PyObject*::+1: PyString_FromStringAndSize:const char*:v:: PyString_FromStringAndSize:int:len:: PyString_FromFormat:PyObject*::+1: PyString_FromFormat:const char*:format:: PyString_FromFormat::...:: PyString_FromFormatV:PyObject*::+1: PyString_FromFormatV:const char*:format:: PyString_FromFormatV:va_list:vargs:: PyString_GET_SIZE:int::: PyString_GET_SIZE:PyObject*:string:0: PyString_InternFromString:PyObject*::+1: PyString_InternFromString:const char*:v:: PyString_InternInPlace:void::: PyString_InternInPlace:PyObject**:string:+1:??? PyString_Size:int::: PyString_Size:PyObject*:string:0: PyString_Decode:PyObject*::+1: PyString_Decode:const char*:s:: PyString_Decode:int:size:: PyString_Decode:const char*:encoding:: PyString_Decode:const char*:errors:: PyString_Encode:PyObject*::+1: PyString_Encode:const char*:s:: PyString_Encode:int:size:: PyString_Encode:const char*:encoding:: PyString_Encode:const char*:errors:: PyString_AsEncodedString:PyObject*::+1: PyString_AsEncodedString:PyObject*:str:: PyString_AsEncodedString:const char*:encoding:: PyString_AsEncodedString:const char*:errors:: PySys_SetArgv:int::: PySys_SetArgv:int:argc:: PySys_SetArgv:char**:argv:: PyThreadState_Clear:void::: PyThreadState_Clear:PyThreadState*:tstate:: PyThreadState_Delete:void::: PyThreadState_Delete:PyThreadState*:tstate:: PyThreadState_Get:PyThreadState*::: PyThreadState_GetDict:PyObject*::0: PyThreadState_New:PyThreadState*::: PyThreadState_New:PyInterpreterState*:interp:: PyThreadState_Swap:PyThreadState*::: PyThreadState_Swap:PyThreadState*:tstate:: PyTime_FromTime:PyObject*::+1: PyTime_FromTime:int:hour:: PyTime_FromTime:int:minute:: PyTime_FromTime:int:second:: PyTime_FromTime:int:usecond:: PyTuple_Check:int::: PyTuple_Check:PyObject*:p:0: PyTuple_GET_ITEM:PyObject*::0: PyTuple_GET_ITEM:PyTupleObject*:p:0: PyTuple_GET_ITEM:int:pos:: PyTuple_GetItem:PyObject*::0: PyTuple_GetItem:PyTupleObject*:p:0: PyTuple_GetItem:int:pos:: PyTuple_GetSlice:PyObject*::+1: PyTuple_GetSlice:PyTupleObject*:p:0: PyTuple_GetSlice:int:low:: PyTuple_GetSlice:int:high:: PyTuple_New:PyObject*::+1: PyTuple_New:int:len:: PyTuple_Pack:PyObject*::+1: PyTuple_Pack:int:len:: PyTuple_Pack:PyObject*:...:0: PyTuple_SET_ITEM:void::: PyTuple_SET_ITEM:PyTupleObject*:p:0: PyTuple_SET_ITEM:int:pos:: PyTuple_SET_ITEM:PyObject*:o:0: PyTuple_SetItem:int::: PyTuple_SetItem:PyTupleObject*:p:0: PyTuple_SetItem:int:pos:: PyTuple_SetItem:PyObject*:o:0: PyTuple_Size:int::: PyTuple_Size:PyTupleObject*:p:0: PyType_GenericAlloc:PyObject*::+1: PyType_GenericAlloc:PyObject*:type:0: PyType_GenericAlloc:int:nitems:0: PyType_GenericNew:PyObject*::+1: PyType_GenericNew:PyObject*:type:0: PyType_GenericNew:PyObject*:args:0: PyType_GenericNew:PyObject*:kwds:0: PyUnicode_Check:int::: PyUnicode_Check:PyObject*:o:0: PyUnicode_GET_SIZE:int::: PyUnicode_GET_SIZE:PyObject*:o:0: PyUnicode_GET_DATA_SIZE:int::: PyUnicode_GET_DATA_SIZE:PyObject*:o:0: PyUnicode_AS_UNICODE:Py_UNICODE*::: PyUnicode_AS_UNICODE:PyObject*:o:0: PyUnicode_AS_DATA:const char*::: PyUnicode_AS_DATA:PyObject*:o:0: Py_UNICODE_ISSPACE:int::: Py_UNICODE_ISSPACE:Py_UNICODE:ch:: Py_UNICODE_ISLOWER:int::: Py_UNICODE_ISLOWER:Py_UNICODE:ch:: Py_UNICODE_ISUPPER:int::: Py_UNICODE_ISUPPER:Py_UNICODE:ch:: Py_UNICODE_ISTITLE:int::: Py_UNICODE_ISTITLE:Py_UNICODE:ch:: Py_UNICODE_ISLINEBREAK:int::: Py_UNICODE_ISLINEBREAK:Py_UNICODE:ch:: Py_UNICODE_ISDECIMAL:int::: Py_UNICODE_ISDECIMAL:Py_UNICODE:ch:: Py_UNICODE_ISDIGIT:int::: Py_UNICODE_ISDIGIT:Py_UNICODE:ch:: Py_UNICODE_ISNUMERIC:int::: Py_UNICODE_ISNUMERIC:Py_UNICODE:ch:: Py_UNICODE_TOLOWER:Py_UNICODE::: Py_UNICODE_TOLOWER:Py_UNICODE:ch:: Py_UNICODE_TOUPPER:Py_UNICODE::: Py_UNICODE_TOUPPER:Py_UNICODE:ch:: Py_UNICODE_TOTITLE:Py_UNICODE::: Py_UNICODE_TOTITLE:Py_UNICODE:ch:: Py_UNICODE_TODECIMAL:int::: Py_UNICODE_TODECIMAL:Py_UNICODE:ch:: Py_UNICODE_TODIGIT:int::: Py_UNICODE_TODIGIT:Py_UNICODE:ch:: Py_UNICODE_TONUMERIC:double::: Py_UNICODE_TONUMERIC:Py_UNICODE:ch:: PyUnicode_FromUnicode:PyObject*::+1: PyUnicode_FromUnicode:const Py_UNICODE*:u:: PyUnicode_FromUnicode:int:size:: PyUnicode_AsUnicode:Py_UNICODE*::: PyUnicode_AsUnicode:PyObject :*unicode:0: PyUnicode_GetSize:int::: PyUnicode_GetSize:PyObject :*unicode:0: PyUnicode_FromObject:PyObject*::+1: PyUnicode_FromObject:PyObject*:*obj:0: PyUnicode_FromEncodedObject:PyObject*::+1: PyUnicode_FromEncodedObject:PyObject*:*obj:0: PyUnicode_FromEncodedObject:const char*:encoding:: PyUnicode_FromEncodedObject:const char*:errors:: PyUnicode_FromWideChar:PyObject*::+1: PyUnicode_FromWideChar:const wchar_t*:w:: PyUnicode_FromWideChar:int:size:: PyUnicode_AsWideChar:int::: PyUnicode_AsWideChar:PyObject*:*unicode:0: PyUnicode_AsWideChar:wchar_t*:w:: PyUnicode_AsWideChar:int:size:: PyUnicode_Decode:PyObject*::+1: PyUnicode_Decode:const char*:s:: PyUnicode_Decode:int:size:: PyUnicode_Decode:const char*:encoding:: PyUnicode_Decode:const char*:errors:: PyUnicode_DecodeUTF16Stateful:PyObject*::+1: PyUnicode_DecodeUTF16Stateful:const char*:s:: PyUnicode_DecodeUTF16Stateful:int:size:: PyUnicode_DecodeUTF16Stateful:const char*:errors:: PyUnicode_DecodeUTF16Stateful:int*:byteorder:: PyUnicode_DecodeUTF16Stateful:int*:consumed:: PyUnicode_DecodeUTF8Stateful:PyObject*::+1: PyUnicode_DecodeUTF8Stateful:const char*:s:: PyUnicode_DecodeUTF8Stateful:int:size:: PyUnicode_DecodeUTF8Stateful:const char*:errors:: PyUnicode_DecodeUTF8Stateful:int*:consumed:: PyUnicode_Encode:PyObject*::+1: PyUnicode_Encode:const Py_UNICODE*:s:: PyUnicode_Encode:int:size:: PyUnicode_Encode:const char*:encoding:: PyUnicode_Encode:const char*:errors:: PyUnicode_AsEncodedString:PyObject*::+1: PyUnicode_AsEncodedString:PyObject*:unicode:: PyUnicode_AsEncodedString:const char*:encoding:: PyUnicode_AsEncodedString:const char*:errors:: PyUnicode_DecodeUTF8:PyObject*::+1: PyUnicode_DecodeUTF8:const char*:s:: PyUnicode_DecodeUTF8:int:size:: PyUnicode_DecodeUTF8:const char*:errors:: PyUnicode_EncodeUTF8:PyObject*::+1: PyUnicode_EncodeUTF8:const Py_UNICODE*:s:: PyUnicode_EncodeUTF8:int:size:: PyUnicode_EncodeUTF8:const char*:errors:: PyUnicode_AsUTF8String:PyObject*::+1: PyUnicode_AsUTF8String:PyObject*:unicode:: PyUnicode_DecodeUTF16:PyObject*::+1: PyUnicode_DecodeUTF16:const char*:s:: PyUnicode_DecodeUTF16:int:size:: PyUnicode_DecodeUTF16:const char*:errors:: PyUnicode_DecodeUTF16:int*:byteorder:: PyUnicode_EncodeUTF16:PyObject*::+1: PyUnicode_EncodeUTF16:const Py_UNICODE*:s:: PyUnicode_EncodeUTF16:int:size:: PyUnicode_EncodeUTF16:const char*:errors:: PyUnicode_EncodeUTF16:int:byteorder:: PyUnicode_AsUTF16String:PyObject*::+1: PyUnicode_AsUTF16String:PyObject*:unicode:: PyUnicode_DecodeUnicodeEscape:PyObject*::+1: PyUnicode_DecodeUnicodeEscape:const char*:s:: PyUnicode_DecodeUnicodeEscape:int:size:: PyUnicode_DecodeUnicodeEscape:const char*:errors:: PyUnicode_EncodeUnicodeEscape:PyObject*::+1: PyUnicode_EncodeUnicodeEscape:const Py_UNICODE*:s:: PyUnicode_EncodeUnicodeEscape:int:size:: PyUnicode_EncodeUnicodeEscape:const char*:errors:: PyUnicode_AsUnicodeEscapeString:PyObject*::+1: PyUnicode_AsUnicodeEscapeString:PyObject*:unicode:: PyUnicode_DecodeRawUnicodeEscape:PyObject*::+1: PyUnicode_DecodeRawUnicodeEscape:const char*:s:: PyUnicode_DecodeRawUnicodeEscape:int:size:: PyUnicode_DecodeRawUnicodeEscape:const char*:errors:: PyUnicode_EncodeRawUnicodeEscape:PyObject*::+1: PyUnicode_EncodeRawUnicodeEscape:const Py_UNICODE*:s:: PyUnicode_EncodeRawUnicodeEscape:int:size:: PyUnicode_EncodeRawUnicodeEscape:const char*:errors:: PyUnicode_AsRawUnicodeEscapeString:PyObject*::+1: PyUnicode_AsRawUnicodeEscapeString:PyObject*:unicode:: PyUnicode_DecodeLatin1:PyObject*::+1: PyUnicode_DecodeLatin1:const char*:s:: PyUnicode_DecodeLatin1:int:size:: PyUnicode_DecodeLatin1:const char*:errors:: PyUnicode_EncodeLatin1:PyObject*::+1: PyUnicode_EncodeLatin1:const Py_UNICODE*:s:: PyUnicode_EncodeLatin1:int:size:: PyUnicode_EncodeLatin1:const char*:errors:: PyUnicode_AsLatin1String:PyObject*::+1: PyUnicode_AsLatin1String:PyObject*:unicode:: PyUnicode_DecodeASCII:PyObject*::+1: PyUnicode_DecodeASCII:const char*:s:: PyUnicode_DecodeASCII:int:size:: PyUnicode_DecodeASCII:const char*:errors:: PyUnicode_EncodeASCII:PyObject*::+1: PyUnicode_EncodeASCII:const Py_UNICODE*:s:: PyUnicode_EncodeASCII:int:size:: PyUnicode_EncodeASCII:const char*:errors:: PyUnicode_AsASCIIString:PyObject*::+1: PyUnicode_AsASCIIString:PyObject*:unicode:: PyUnicode_DecodeCharmap:PyObject*::+1: PyUnicode_DecodeCharmap:const char*:s:: PyUnicode_DecodeCharmap:int:size:: PyUnicode_DecodeCharmap:PyObject*:mapping:0: PyUnicode_DecodeCharmap:const char*:errors:: PyUnicode_EncodeCharmap:PyObject*::+1: PyUnicode_EncodeCharmap:const Py_UNICODE*:s:: PyUnicode_EncodeCharmap:int:size:: PyUnicode_EncodeCharmap:PyObject*:mapping:0: PyUnicode_EncodeCharmap:const char*:errors:: PyUnicode_AsCharmapString:PyObject*::+1: PyUnicode_AsCharmapString:PyObject*:unicode:0: PyUnicode_AsCharmapString:PyObject*:mapping:0: PyUnicode_TranslateCharmap:PyObject*::+1: PyUnicode_TranslateCharmap:const Py_UNICODE*:s:: PyUnicode_TranslateCharmap:int:size:: PyUnicode_TranslateCharmap:PyObject*:table:0: PyUnicode_TranslateCharmap:const char*:errors:: PyUnicode_DecodeMBCS:PyObject*::+1: PyUnicode_DecodeMBCS:const char*:s:: PyUnicode_DecodeMBCS:int:size:: PyUnicode_DecodeMBCS:const char*:errors:: PyUnicode_EncodeMBCS:PyObject*::+1: PyUnicode_EncodeMBCS:const Py_UNICODE*:s:: PyUnicode_EncodeMBCS:int:size:: PyUnicode_EncodeMBCS:const char*:errors:: PyUnicode_AsMBCSString:PyObject*::+1: PyUnicode_AsMBCSString:PyObject*:unicode:: PyUnicode_Concat:PyObject*::+1: PyUnicode_Concat:PyObject*:left:0: PyUnicode_Concat:PyObject*:right:0: PyUnicode_Split:PyObject*::+1: PyUnicode_Split:PyObject*:left:0: PyUnicode_Split:PyObject*:right:0: PyUnicode_Split:int:maxsplit:: PyUnicode_Splitlines:PyObject*::+1: PyUnicode_Splitlines:PyObject*:s:0: PyUnicode_Splitlines:int:maxsplit:: PyUnicode_Translate:PyObject*::+1: PyUnicode_Translate:PyObject*:str:0: PyUnicode_Translate:PyObject*:table:0: PyUnicode_Translate:const char*:errors:: PyUnicode_Join:PyObject*::+1: PyUnicode_Join:PyObject*:separator:0: PyUnicode_Join:PyObject*:seq:0: PyUnicode_Tailmatch:PyObject*::+1: PyUnicode_Tailmatch:PyObject*:str:0: PyUnicode_Tailmatch:PyObject*:substr:0: PyUnicode_Tailmatch:int:start:: PyUnicode_Tailmatch:int:end:: PyUnicode_Tailmatch:int:direction:: PyUnicode_Find:int::: PyUnicode_Find:PyObject*:str:0: PyUnicode_Find:PyObject*:substr:0: PyUnicode_Find:int:start:: PyUnicode_Find:int:end:: PyUnicode_Find:int:direction:: PyUnicode_Count:int::: PyUnicode_Count:PyObject*:str:0: PyUnicode_Count:PyObject*:substr:0: PyUnicode_Count:int:start:: PyUnicode_Count:int:end:: PyUnicode_Replace:PyObject*::+1: PyUnicode_Replace:PyObject*:str:0: PyUnicode_Replace:PyObject*:substr:0: PyUnicode_Replace:PyObject*:replstr:0: PyUnicode_Replace:int:maxcount:: PyUnicode_Compare:int::: PyUnicode_Compare:PyObject*:left:0: PyUnicode_Compare:PyObject*:right:0: PyUnicode_Format:PyObject*::+1: PyUnicode_Format:PyObject*:format:0: PyUnicode_Format:PyObject*:args:0: PyUnicode_Contains:int::: PyUnicode_Contains:PyObject*:container:0: PyUnicode_Contains:PyObject*:element:0: PyWeakref_GET_OBJECT:PyObject*::0: PyWeakref_GET_OBJECT:PyObject*:ref:0: PyWeakref_GetObject:PyObject*::0: PyWeakref_GetObject:PyObject*:ref:0: PyWeakref_NewProxy:PyObject*::+1: PyWeakref_NewProxy:PyObject*:ob:0: PyWeakref_NewProxy:PyObject*:callback:0: PyWeakref_NewRef:PyObject*::+1: PyWeakref_NewRef:PyObject*:ob:0: PyWeakref_NewRef:PyObject*:callback:0: PyWrapper_New:PyObject*::+1: PyWrapper_New:PyObject*:d:0: PyWrapper_New:PyObject*:self:0: Py_AtExit:int::: Py_AtExit:void (*)():func:: Py_BuildValue:PyObject*::+1: Py_BuildValue:char*:format:: Py_CompileString:PyObject*::+1: Py_CompileString:char*:str:: Py_CompileString:char*:filename:: Py_CompileString:int:start:: Py_CompileStringFlags:PyObject*::+1: Py_CompileStringFlags:char*:str:: Py_CompileStringFlags:char*:filename:: Py_CompileStringFlags:int:start:: Py_CompileStringFlags:PyCompilerFlags*:flags:: Py_DECREF:void::: Py_DECREF:PyObject*:o:-1: Py_EndInterpreter:void::: Py_EndInterpreter:PyThreadState*:tstate:: Py_Exit:void::: Py_Exit:int:status:: Py_FatalError:void::: Py_FatalError:char*:message:: Py_FdIsInteractive:int::: Py_FdIsInteractive:FILE*:fp:: Py_FdIsInteractive:char*:filename:: Py_Finalize:void::: Py_FindMethod:PyObject*::+1: Py_FindMethod:PyMethodDef[]:methods:: Py_FindMethod:PyObject*:self:+1: Py_FindMethod:char*:name:: Py_GetBuildInfoconst:char*::: Py_GetCompilerconst:char*::: Py_GetCopyrightconst:char*::: Py_GetExecPrefix:char*::: Py_GetPath:char*::: Py_GetPlatformconst:char*::: Py_GetPrefix:char*::: Py_GetProgramFullPath:char*::: Py_GetProgramName:char*::: Py_GetVersionconst:char*::: Py_INCREF:void::: Py_INCREF:PyObject*:o:+1: Py_Initialize:void::: Py_IsInitialized:int::: Py_NewInterpreter:PyThreadState*::: Py_SetProgramName:void::: Py_SetProgramName:char*:name:: Py_XDECREF:void::: Py_XDECREF:PyObject*:o:-1:if o is not NULL Py_XINCREF:void::: Py_XINCREF:PyObject*:o:+1:if o is not NULL _PyImport_FindExtension:PyObject*::0:??? see PyImport_AddModule _PyImport_FindExtension:char*::: _PyImport_FindExtension:char*::: _PyImport_Fini:void::: _PyImport_FixupExtension:PyObject*:::??? _PyImport_FixupExtension:char*::: _PyImport_FixupExtension:char*::: _PyImport_Init:void::: _PyObject_Del:void::: _PyObject_Del:PyObject*:op:0: _PyObject_New:PyObject*::+1: _PyObject_New:PyTypeObject*:type:0: _PyObject_NewVar:PyObject*::+1: _PyObject_NewVar:PyTypeObject*:type:0: _PyObject_NewVar:int:size:: _PyString_Resize:int::: _PyString_Resize:PyObject**:string:+1: _PyString_Resize:int:newsize:: _PyTuple_Resize:int::: _PyTuple_Resize:PyTupleObject**:p:+1: _PyTuple_Resize:int:new:: _Py_c_diff:Py_complex::: _Py_c_diff:Py_complex:left:: _Py_c_diff:Py_complex:right:: _Py_c_neg:Py_complex::: _Py_c_neg:Py_complex:complex:: _Py_c_pow:Py_complex::: _Py_c_pow:Py_complex:num:: _Py_c_pow:Py_complex:exp:: _Py_c_prod:Py_complex::: _Py_c_prod:Py_complex:left:: _Py_c_prod:Py_complex:right:: _Py_c_quot:Py_complex::: _Py_c_quot:Py_complex:dividend:: _Py_c_quot:Py_complex:divisor:: _Py_c_sum:Py_complex::: _Py_c_sum:Py_complex:left:: _Py_c_sum:Py_complex:right:: python-old-doctools-2.5.5/Doc/tools/0000755000175000017500000000000011124163007015756 5ustar dokodokopython-old-doctools-2.5.5/Doc/tools/push-docs.sh0000755000175000017500000000567710145444103020242 0ustar dokodoko#! /bin/sh # Script to push docs from my development area to SourceForge, where the # update-docs.sh script unpacks them into their final destination. TARGETHOST=www.python.org TARGETDIR=/usr/home/fdrake/tmp PKGTYPE="bzip" # must be one of: bzip, tar, zip ("tar" implies gzip) TARGET="$TARGETHOST:$TARGETDIR" ADDRESSES='python-dev@python.org doc-sig@python.org python-list@python.org' TOOLDIR="`dirname $0`" VERSION=`$TOOLDIR/getversioninfo` # Set $EXTRA to something non-empty if this is a non-trunk version: EXTRA=`echo "$VERSION" | sed 's/^[0-9][0-9]*\.[0-9][0-9]*//'` if echo "$EXTRA" | grep -q '[.]' ; then DOCLABEL="maintenance" DOCTYPE="maint" else DOCLABEL="development" DOCTYPE="devel" fi DOCTYPE_SPECIFIED=false EXPLANATION='' ANNOUNCE=true getopt -T >/dev/null if [ $? -eq 4 ] ; then # We have a sufficiently useful getopt(1) implementation. eval "set -- `getopt -ssh m:p:qt:F: \"$@\"`" else # This version of getopt doesn't support quoting of long options # with spaces, so let's not rely on it at all. : fi while [ "$#" -gt 0 ] ; do case "$1" in -m) EXPLANATION="$2" shift 2 ;; -p) PKGTYPE="$2" shift 1 ;; -q) ANNOUNCE=false shift 1 ;; -t) DOCTYPE="$2" DOCTYPE_SPECIFIED=true shift 2 ;; -F) EXPLANATION="`cat $2`" shift 2 ;; --) shift 1 break ;; -*) echo "Unknown option: $1" >&2 exit 2 ;; *) break ;; esac done if [ "$1" ] ; then if [ "$EXPLANATION" ] ; then echo "Explanation may only be given once!" >&2 exit 2 fi EXPLANATION="$1" shift fi START="`pwd`" MYDIR="`dirname $0`" cd "$MYDIR" MYDIR="`pwd`" if [ "$PKGTYPE" = bzip ] ; then PKGEXT=tar.bz2 elif [ "$PKGTYPE" = tar ] ; then PKGEXT=tgz elif [ "$PKGTYPE" = zip ] ; then PKGEXT=zip else echo 1>&2 "unsupported package type: $PKGTYPE" exit 2 fi # switch to .../Doc/ cd .. # If $DOCTYPE was not specified explicitly, look for .doctype in # .../Doc/ and use the content of that file if present. if $DOCTYPE_SPECIFIED ; then : elif [ -f .doctype ] ; then DOCTYPE="`cat .doctype`" fi make --no-print-directory ${PKGTYPE}html || exit $? PACKAGE="html-$VERSION.$PKGEXT" scp "$PACKAGE" tools/update-docs.sh $TARGET/ || exit $? ssh "$TARGETHOST" tmp/update-docs.sh $DOCTYPE $PACKAGE '&&' rm tmp/update-docs.sh || exit $? if $ANNOUNCE ; then sendmail $ADDRESSES < Subject: [$DOCLABEL doc updates] X-No-Archive: yes The $DOCLABEL version of the documentation has been updated: http://$TARGETHOST/dev/doc/$DOCTYPE/ $EXPLANATION A downloadable package containing the HTML is also available: http://$TARGETHOST/dev/doc/python-docs-$DOCTYPE.$PKGEXT EOF exit $? fi python-old-doctools-2.5.5/Doc/tools/indfix.py0000755000175000017500000000437707553303011017631 0ustar dokodoko#! /usr/bin/env python """Combine similar index entries into an entry and subentries. For example: \item {foobar} (in module flotz), 23 \item {foobar} (in module whackit), 4323 becomes \item {foobar} \subitem in module flotz, 23 \subitem in module whackit, 4323 Note that an item which matches the format of a collapsable item but which isn't part of a group of similar items is not modified. """ __version__ = '$Revision: 29268 $' import re import StringIO import sys def cmp_entries(e1, e2): return cmp(e1[1].lower(), e2[1].lower()) or cmp(e1, e2) def dump_entries(write, entries): if len(entries) == 1: write(" \\item %s (%s)%s\n" % entries[0]) return write(" \item %s\n" % entries[0][0]) # now sort these in a case insensitive manner: if len(entries) > 0: entries.sort(cmp_entries) for xxx, subitem, pages in entries: write(" \subitem %s%s\n" % (subitem, pages)) breakable_re = re.compile( r" \\item (.*) [(](.*)[)]((?:(?:, \d+)|(?:, \\[a-z]*\{\d+\}))+)") def process(ifn, ofn=None): if ifn == "-": ifp = sys.stdin else: ifp = open(ifn) if ofn is None: ofn = ifn ofp = StringIO.StringIO() entries = [] match = breakable_re.match write = ofp.write while 1: line = ifp.readline() if not line: break m = match(line) if m: entry = m.group(1, 2, 3) if entries and entries[-1][0] != entry[0]: dump_entries(write, entries) entries = [] entries.append(entry) elif entries: dump_entries(write, entries) entries = [] write(line) else: write(line) del write del match ifp.close() data = ofp.getvalue() ofp.close() if ofn == "-": ofp = sys.stdout else: ofp = open(ofn, "w") ofp.write(data) ofp.close() def main(): import getopt outfile = None opts, args = getopt.getopt(sys.argv[1:], "o:") for opt, val in opts: if opt in ("-o", "--output"): outfile = val filename = args[0] outfile = outfile or filename process(filename, outfile) if __name__ == "__main__": main() python-old-doctools-2.5.5/Doc/tools/getversioninfo0000755000175000017500000000337610050161164020755 0ustar dokodoko#! /usr/bin/env python import os import re import sys try: __file__ except NameError: __file__ = sys.argv[0] tools = os.path.dirname(os.path.abspath(__file__)) Doc = os.path.dirname(tools) src = os.path.dirname(Doc) patchlevel_h = os.path.join(src, "Include", "patchlevel.h") # This won't pick out all #defines, but it will pick up the ones we # care about. rx = re.compile(r"\s*#define\s+([a-zA-Z][a-zA-Z_0-9]*)\s+([a-zA-Z_0-9]+)") d = {} f = open(patchlevel_h) for line in f: m = rx.match(line) if m is not None: name, value = m.group(1, 2) d[name] = value f.close() release = "%s.%s" % (d["PY_MAJOR_VERSION"], d["PY_MINOR_VERSION"]) micro = int(d["PY_MICRO_VERSION"]) shortversion = release if micro != 0: release += "." + str(micro) level = d["PY_RELEASE_LEVEL"] suffixes = { "PY_RELEASE_LEVEL_ALPHA": "a", "PY_RELEASE_LEVEL_BETA": "b", "PY_RELEASE_LEVEL_GAMMA": "c", } releaseinfo = "" if level != "PY_RELEASE_LEVEL_FINAL": releaseinfo = suffixes[level] + str(int(d["PY_RELEASE_SERIAL"])) def write_file(name, text): """Write text to a file if the file doesn't exist or if text differs from any existing content.""" if os.path.exists(name): f = open(name, "r") s = f.read() f.close() if s == text: return f = open(name, "w") f.write(text) f.close() patchlevel_tex = os.path.join(Doc, "commontex", "patchlevel.tex") write_file(patchlevel_tex, "%% This file is generated by ../tools/getversioninfo;\n" "%% do not edit manually.\n" "\n" "\\release{%s}\n" "\\setreleaseinfo{%s}\n" "\\setshortversion{%s}\n" % (release, releaseinfo, shortversion)) print release + releaseinfo python-old-doctools-2.5.5/Doc/tools/fixinfo.el0000644000175000017500000000067106653656644017777 0ustar dokodoko(defun fix-python-texinfo () (goto-char (point-min)) (replace-regexp "\\(@setfilename \\)\\([-a-z]*\\)$" "\\1python-\\2.info") (replace-string "@node Front Matter\n@chapter Abstract\n" "@node Abstract\n@section Abstract\n") (mark-whole-buffer) (texinfo-master-menu 'update-all-nodes) (save-buffer) ) ;; fix-python-texinfo ;; now really do it: (find-file (car command-line-args-left)) (fix-python-texinfo) (kill-emacs) python-old-doctools-2.5.5/Doc/tools/refcounts.py0000644000175000017500000000441610012734544020352 0ustar dokodoko"""Support functions for loading the reference count data file.""" __version__ = '$Revision: 35267 $' import os import sys # Determine the expected location of the reference count file: try: p = os.path.dirname(__file__) except NameError: p = os.path.dirname(sys.argv[0]) p = os.path.normpath(os.path.join(os.getcwd(), p, os.pardir, "api", "refcounts.dat")) DEFAULT_PATH = p del p def load(path=DEFAULT_PATH): return loadfile(open(path)) def loadfile(fp): d = {} while 1: line = fp.readline() if not line: break line = line.strip() if line[:1] in ("", "#"): # blank lines and comments continue parts = line.split(":", 4) if len(parts) != 5: raise ValueError("Not enough fields in %r" % line) function, type, arg, refcount, comment = parts if refcount == "null": refcount = None elif refcount: refcount = int(refcount) else: refcount = None # # Get the entry, creating it if needed: # try: entry = d[function] except KeyError: entry = d[function] = Entry(function) # # Update the entry with the new parameter or the result information. # if arg: entry.args.append((arg, type, refcount)) else: entry.result_type = type entry.result_refs = refcount return d class Entry: def __init__(self, name): self.name = name self.args = [] self.result_type = '' self.result_refs = None def dump(d): """Dump the data in the 'canonical' format, with functions in sorted order.""" items = d.items() items.sort() first = 1 for k, entry in items: if first: first = 0 else: print s = entry.name + ":%s:%s:%s:" if entry.result_refs is None: r = "" else: r = entry.result_refs print s % (entry.result_type, "", r) for t, n, r in entry.args: if r is None: r = "" print s % (t, n, r) def main(): d = load() dump(d) if __name__ == "__main__": main() python-old-doctools-2.5.5/Doc/tools/buildindex.py0000755000175000017500000002533410073142734020477 0ustar dokodoko#! /usr/bin/env python __version__ = '$Revision: 36356 $' import os.path import re import string import sys from xml.sax.saxutils import quoteattr bang_join = "!".join null_join = "".join REPLACEMENTS = [ # Hackish way to deal with macros replaced with simple text (re.compile(r"\\ABC\b"), "ABC"), (re.compile(r"\\ASCII\b"), "ASCII"), (re.compile(r"\\Cpp\b"), "C++"), (re.compile(r"\\EOF\b"), "EOF"), (re.compile(r"\\NULL\b"), "NULL"), (re.compile(r"\\POSIX\b"), "POSIX"), (re.compile(r"\\UNIX\b"), "Unix"), # deal with turds left over from LaTeX2HTML (re.compile(r"<#\d+#>"), ""), ] class Node: continuation = 0 def __init__(self, link, str, seqno): self.links = [link] self.seqno = seqno for pattern, replacement in REPLACEMENTS: str = pattern.sub(replacement, str) # build up the text self.text = split_entry_text(str) self.key = split_entry_key(str) def __cmp__(self, other): """Comparison operator includes sequence number, for use with list.sort().""" return self.cmp_entry(other) or cmp(self.seqno, other.seqno) def cmp_entry(self, other): """Comparison 'operator' that ignores sequence number.""" c = 0 for i in range(min(len(self.key), len(other.key))): c = (cmp_part(self.key[i], other.key[i]) or cmp_part(self.text[i], other.text[i])) if c: break return c or cmp(self.key, other.key) or cmp(self.text, other.text) def __repr__(self): return "" % (bang_join(self.text), self.seqno) def __str__(self): return bang_join(self.key) def dump(self): return "%s\1%s###%s\n" \ % ("\1".join(self.links), bang_join(self.text), self.seqno) def cmp_part(s1, s2): result = cmp(s1, s2) if result == 0: return 0 l1 = s1.lower() l2 = s2.lower() minlen = min(len(s1), len(s2)) if len(s1) < len(s2) and l1 == l2[:len(s1)]: result = -1 elif len(s2) < len(s1) and l2 == l1[:len(s2)]: result = 1 else: result = cmp(l1, l2) or cmp(s1, s2) return result def split_entry(str, which): stuff = [] parts = str.split('!') parts = [part.split('@') for part in parts] for entry in parts: if len(entry) != 1: key = entry[which] else: key = entry[0] stuff.append(key) return stuff _rmtt = re.compile(r"""(.*)(.*)(.*)$""", re.IGNORECASE) _rmparens = re.compile(r"\(\)") def split_entry_key(str): parts = split_entry(str, 1) for i in range(len(parts)): m = _rmtt.match(parts[i]) if m: parts[i] = null_join(m.group(1, 2, 3)) else: parts[i] = parts[i].lower() # remove '()' from the key: parts[i] = _rmparens.sub('', parts[i]) return map(trim_ignored_letters, parts) def split_entry_text(str): if '<' in str: m = _rmtt.match(str) if m: str = null_join(m.group(1, 2, 3)) return split_entry(str, 1) def load(fp): nodes = [] rx = re.compile("(.*)\1(.*)###(.*)$") while 1: line = fp.readline() if not line: break m = rx.match(line) if m: link, str, seqno = m.group(1, 2, 3) nodes.append(Node(link, str, seqno)) return nodes def trim_ignored_letters(s): # ignore $ to keep environment variables with the # leading letter from the name if s.startswith("$"): return s[1:].lower() else: return s.lower() def get_first_letter(s): if s.startswith(""): return "%" else: return trim_ignored_letters(s)[0] def split_letters(nodes): letter_groups = [] if nodes: group = [] append = group.append letter = get_first_letter(nodes[0].text[0]) letter_groups.append((letter, group)) for node in nodes: nletter = get_first_letter(node.text[0]) if letter != nletter: letter = nletter group = [] letter_groups.append((letter, group)) append = group.append append(node) return letter_groups def group_symbols(groups): entries = [] ident_letters = string.ascii_letters + "_" while groups[0][0] not in ident_letters: entries += groups[0][1] del groups[0] if entries: groups.insert(0, ("Symbols", entries)) # need a function to separate the nodes into columns... def split_columns(nodes, columns=1): if columns <= 1: return [nodes] # This is a rough height; we may have to increase to avoid breaks before # a subitem. colheight = int(len(nodes) / columns) numlong = int(len(nodes) % columns) if numlong: colheight = colheight + 1 else: numlong = columns cols = [] for i in range(numlong): start = i * colheight end = start + colheight cols.append(nodes[start:end]) del nodes[:end] colheight = colheight - 1 try: numshort = int(len(nodes) / colheight) except ZeroDivisionError: cols = cols + (columns - len(cols)) * [[]] else: for i in range(numshort): start = i * colheight end = start + colheight cols.append(nodes[start:end]) # # If items continue across columns, make sure they are marked # as continuations so the user knows to look at the previous column. # for i in range(len(cols) - 1): try: prev = cols[i][-1] next = cols[i + 1][0] except IndexError: return cols else: n = min(len(prev.key), len(next.key)) for j in range(n): if prev.key[j] != next.key[j]: break next.continuation = j + 1 return cols DL_LEVEL_INDENT = " " def format_column(nodes): strings = ["
"] append = strings.append level = 0 previous = [] for node in nodes: current = node.text count = 0 for i in range(min(len(current), len(previous))): if previous[i] != current[i]: break count = i + 1 if count > level: append("
" * (count - level) + "\n") level = count elif level > count: append("\n") append(level * DL_LEVEL_INDENT) append("
" * (level - count)) level = count # else: level == count for i in range(count, len(current) - 1): term = node.text[i] level = level + 1 if node.continuation > i: extra = " (continued)" else: extra = "" append("\n
%s%s\n
\n%s
" % (term, extra, level * DL_LEVEL_INDENT)) append("\n%s
%s%s" % (level * DL_LEVEL_INDENT, node.links[0], node.text[-1])) for link in node.links[1:]: append(",\n%s %s[Link]" % (level * DL_LEVEL_INDENT, link)) previous = current append("\n") append("
" * (level + 1)) return null_join(strings) def format_nodes(nodes, columns=1): strings = [] append = strings.append if columns > 1: colnos = range(columns) colheight = int(len(nodes) / columns) if len(nodes) % columns: colheight = colheight + 1 colwidth = int(100 / columns) append('') for col in split_columns(nodes, columns): append('") append("\n
\n' % colwidth) append(format_column(col)) append("\n
") else: append(format_column(nodes)) return null_join(strings) def format_letter(letter): if letter == '.': lettername = ". (dot)" elif letter == '_': lettername = "_ (underscore)" else: lettername = letter.capitalize() return "\n
\n

%s

\n\n" \ % (quoteattr("letter-" + letter), lettername) def format_html_letters(nodes, columns, group_symbol_nodes): letter_groups = split_letters(nodes) if group_symbol_nodes: group_symbols(letter_groups) items = [] for letter, nodes in letter_groups: s = "%s" % (letter, letter) items.append(s) s = ["
\n%s
\n" % " |\n".join(items)] for letter, nodes in letter_groups: s.append(format_letter(letter)) s.append(format_nodes(nodes, columns)) return null_join(s) def format_html(nodes, columns): return format_nodes(nodes, columns) def collapse(nodes): """Collapse sequences of nodes with matching keys into a single node. Destructive.""" if len(nodes) < 2: return prev = nodes[0] i = 1 while i < len(nodes): node = nodes[i] if not node.cmp_entry(prev): prev.links.append(node.links[0]) del nodes[i] else: i = i + 1 prev = node def dump(nodes, fp): for node in nodes: fp.write(node.dump()) def process_nodes(nodes, columns, letters=0, group_symbol_nodes=0): nodes.sort() collapse(nodes) if letters: return format_html_letters(nodes, columns, group_symbol_nodes) else: return format_html(nodes, columns) def main(): import getopt ifn = "-" ofn = "-" columns = 1 letters = 0 group_symbol_nodes = 1 opts, args = getopt.getopt(sys.argv[1:], "c:lo:", ["columns=", "dont-group-symbols", "group-symbols", "letters", "output="]) for opt, val in opts: if opt in ("-o", "--output"): ofn = val elif opt in ("-c", "--columns"): columns = int(val, 10) elif opt in ("-l", "--letters"): letters = 1 elif opt == "--group-symbols": group_symbol_nodes = 1 elif opt == "--dont-group-symbols": group_symbol_nodes = 0 if not args: args = [ifn] nodes = [] for fn in args: nodes = nodes + load(open(fn)) num_nodes = len(nodes) html = process_nodes(nodes, columns, letters, group_symbol_nodes) program = os.path.basename(sys.argv[0]) if ofn == "-": sys.stdout.write(html) sys.stderr.write("\n%s: %d index nodes" % (program, num_nodes)) else: open(ofn, "w").write(html) print print "%s: %d index nodes" % (program, num_nodes) if __name__ == "__main__": main() python-old-doctools-2.5.5/Doc/tools/update-docs.sh0000755000175000017500000000135210075013372020531 0ustar dokodoko#! /bin/sh # Script which installs a development snapshot of the documentation # into the development website. # # The push-docs.sh script pushes this to the server when needed # and removes it when done. if [ -z "$HOME" ] ; then HOME=`grep "$LOGNAME" /etc/passwd | sed 's|^.*:\([^:]*\):[^:]*$|\1|'` export HOME fi DOCTYPE="$1" UPDATES="$HOME/tmp/$2" TMPDIR="$$-docs" cd /ftp/ftp.python.org/pub/www.python.org/dev/doc/ || exit $? mkdir $TMPDIR || exit $? cd $TMPDIR || exit $? (bzip2 -dc "$UPDATES" | tar xf -) || exit $? cd .. || exit $? if [ -d $DOCTYPE ] ; then mv $DOCTYPE $DOCTYPE-temp fi mv $TMPDIR/Python-Docs-* $DOCTYPE rmdir $TMPDIR rm -rf $DOCTYPE-temp || exit $? mv "$UPDATES" python-docs-$DOCTYPE.tar.bz2 || exit $? python-old-doctools-2.5.5/Doc/tools/prechm.py0000644000175000017500000004174510413253206017622 0ustar dokodoko""" Makes the necesary files to convert from plain html of Python 1.5 and 1.5.x Documentation to Microsoft HTML Help format version 1.1 Doesn't change the html's docs. by hernan.foffani@iname.com no copyright and no responsabilities. modified by Dale Nagata for Python 1.5.2 Renamed from make_chm.py to prechm.py, and checked into the Python project, 19-Apr-2002 by Tim Peters. Assorted modifications by Tim and Fred Drake. Obtained from Robin Dunn's .chm packaging of the Python 2.2 docs, at . """ import sys import os from formatter import NullWriter, AbstractFormatter from htmllib import HTMLParser import getopt import cgi usage_mode = ''' Usage: prechm.py [-c] [-k] [-p] [-v 1.5[.x]] filename -c: does not build filename.hhc (Table of Contents) -k: does not build filename.hhk (Index) -p: does not build filename.hhp (Project File) -v 1.5[.x]: makes help for the python 1.5[.x] docs (default is python 1.5.2 docs) ''' # Project file (*.hhp) template. 'arch' is the file basename (like # the pythlp in pythlp.hhp); 'version' is the doc version number (like # the 2.2 in Python 2.2). # The magical numbers in the long line under [WINDOWS] set most of the # user-visible features (visible buttons, tabs, etc). # About 0x10384e: This defines the buttons in the help viewer. The # following defns are taken from htmlhelp.h. Not all possibilities # actually work, and not all those that work are available from the Help # Workshop GUI. In particular, the Zoom/Font button works and is not # available from the GUI. The ones we're using are marked with 'x': # # 0x000002 Hide/Show x # 0x000004 Back x # 0x000008 Forward x # 0x000010 Stop # 0x000020 Refresh # 0x000040 Home x # 0x000080 Forward # 0x000100 Back # 0x000200 Notes # 0x000400 Contents # 0x000800 Locate x # 0x001000 Options x # 0x002000 Print x # 0x004000 Index # 0x008000 Search # 0x010000 History # 0x020000 Favorites # 0x040000 Jump 1 # 0x080000 Jump 2 # 0x100000 Zoom/Font x # 0x200000 TOC Next # 0x400000 TOC Prev project_template = ''' [OPTIONS] Compiled file=%(arch)s.chm Contents file=%(arch)s.hhc Default Window=%(arch)s Default topic=index.html Display compile progress=No Full text search stop list file=%(arch)s.stp Full-text search=Yes Index file=%(arch)s.hhk Language=0x409 Title=Python %(version)s Documentation [WINDOWS] %(arch)s="Python %(version)s Documentation","%(arch)s.hhc","%(arch)s.hhk",\ "index.html","index.html",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0 [FILES] ''' contents_header = '''\
    ''' contents_footer = '''\
''' object_sitemap = '''\ ''' # List of words the full text search facility shouldn't index. This # becomes file ARCH.stp. Note that this list must be pretty small! # Different versions of the MS docs claim the file has a maximum size of # 256 or 512 bytes (including \r\n at the end of each line). # Note that "and", "or", "not" and "near" are operators in the search # language, so no point indexing them even if we wanted to. stop_list = ''' a and are as at be but by for if in into is it near no not of on or such that the their then there these they this to was will with ''' # s is a string or None. If None or empty, return None. Else tack '.html' # on to the end, unless it's already there. def addhtml(s): if s: if not s.endswith('.html'): s += '.html' return s # Convenience class to hold info about "a book" in HTMLHelp terms == a doc # directory in Python terms. class Book: def __init__(self, directory, title, firstpage, contentpage=None, indexpage=None): self.directory = directory self.title = title self.firstpage = addhtml(firstpage) self.contentpage = addhtml(contentpage) self.indexpage = addhtml(indexpage) # Library Doc list of books: # each 'book' : (Dir, Title, First page, Content page, Index page) supported_libraries = { '2.5': [ Book('.', 'Main page', 'index'), Book('.', 'Global Module Index', 'modindex'), Book('whatsnew', "What's New", 'index', 'contents'), Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents'), Book('inst','Installing Python Modules', 'inst', 'index'), Book('dist','Distributing Python Modules', 'dist', 'index', 'genindex'), ], '2.4': [ Book('.', 'Main page', 'index'), Book('.', 'Global Module Index', 'modindex'), Book('whatsnew', "What's New", 'index', 'contents'), Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents'), Book('inst','Installing Python Modules', 'inst', 'index'), Book('dist','Distributing Python Modules', 'dist', 'index', 'genindex'), ], '2.3': [ Book('.', 'Main page', 'index'), Book('.', 'Global Module Index', 'modindex'), Book('whatsnew', "What's New", 'index', 'contents'), Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents'), Book('inst','Installing Python Modules', 'inst', 'index'), Book('dist','Distributing Python Modules', 'dist', 'index'), ], '2.2': [ Book('.', 'Main page', 'index'), Book('.', 'Global Module Index', 'modindex'), Book('whatsnew', "What's New", 'index', 'contents'), Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents'), Book('inst','Installing Python Modules', 'inst', 'index'), Book('dist','Distributing Python Modules', 'dist', 'index'), ], '2.1.1': [ Book('.', 'Main page', 'index'), Book('.', 'Global Module Index', 'modindex'), Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents'), Book('inst','Installing Python Modules', 'inst', 'index'), Book('dist','Distributing Python Modules', 'dist', 'index'), ], '2.0.0': [ Book('.', 'Global Module Index', 'modindex'), Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents'), Book('inst','Installing Python Modules', 'inst', 'contents'), Book('dist','Distributing Python Modules', 'dist', 'contents'), ], # Apr 17/99: library for 1.5.2 version: # May 01/99: library for 1.5.2 (04/30/99): '1.5.2': [ Book('tut','Tutorial','tut','node2'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref','contents','genindex'), Book('mac','Macintosh Reference','mac','contents','genindex'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex'), Book('doc','Documenting Python','doc','contents') ], # library for 1.5.1 version: '1.5.1': [ Book('tut','Tutorial','tut','contents'), Book('lib','Library Reference','lib','contents','genindex'), Book('ref','Language Reference','ref-1','ref-2','ref-11'), Book('ext','Extending and Embedding','ext','contents'), Book('api','Python/C API','api','contents','genindex') ], # library for 1.5 version: '1.5': [ Book('tut','Tutorial','tut','node1'), Book('lib','Library Reference','lib','node1','node268'), Book('ref','Language Reference','ref-1','ref-2','ref-11'), Book('ext','Extending and Embedding','ext','node1'), Book('api','Python/C API','api','node1','node48') ] } # AlmostNullWriter doesn't print anything; it just arranges to save the # text sent to send_flowing_data(). This is used to capture the text # between an anchor begin/end pair, e.g. for TOC entries. class AlmostNullWriter(NullWriter): def __init__(self): NullWriter.__init__(self) self.saved_clear() def send_flowing_data(self, data): stripped = data.strip() if stripped: # don't bother to save runs of whitespace self.saved.append(stripped) # Forget all saved text. def saved_clear(self): self.saved = [] # Return all saved text as a string. def saved_get(self): return ' '.join(self.saved) class HelpHtmlParser(HTMLParser): def __init__(self, formatter, path, output): HTMLParser.__init__(self, formatter) self.path = path # relative path self.ft = output # output file self.indent = 0 # number of tabs for pretty printing of files self.proc = False # True when actively processing, else False # (headers, footers, etc) # XXX This shouldn't need to be a stack -- anchors shouldn't nest. # XXX See SF bug . self.hrefstack = [] # stack of hrefs from anchor begins def begin_group(self): self.indent += 1 self.proc = True def finish_group(self): self.indent -= 1 # stop processing when back to top level self.proc = self.indent > 0 def anchor_bgn(self, href, name, type): if self.proc: # XXX See SF bug . # XXX index.html for the 2.2.1 language reference manual contains # XXX nested tags in the entry for the section on blank # XXX lines. We want to ignore the nested part completely. if len(self.hrefstack) == 0: self.saved_clear() self.hrefstack.append(href) def anchor_end(self): if self.proc: # XXX See XXX above. if self.hrefstack: title = cgi.escape(self.saved_get(), True) path = self.path + '/' + self.hrefstack.pop() self.tab(object_sitemap % (title, path)) def start_dl(self, atr_val): self.begin_group() def end_dl(self): self.finish_group() def do_dt(self, atr_val): # no trailing newline on purpose! self.tab("
  • ") # Write text to output file. def write(self, text): self.ft.write(text) # Write text to output file after indenting by self.indent tabs. def tab(self, text=''): self.write('\t' * self.indent) if text: self.write(text) # Forget all saved text. def saved_clear(self): self.formatter.writer.saved_clear() # Return all saved text as a string. def saved_get(self): return self.formatter.writer.saved_get() class IdxHlpHtmlParser(HelpHtmlParser): # nothing special here, seems enough with parent class pass class TocHlpHtmlParser(HelpHtmlParser): def start_dl(self, atr_val): self.begin_group() self.tab('
      \n') def end_dl(self): self.finish_group() self.tab('
    \n') def start_ul(self, atr_val): self.begin_group() self.tab('
      \n') def end_ul(self): self.finish_group() self.tab('
    \n') def do_li(self, atr_val): # no trailing newline on purpose! self.tab("
  • ") def index(path, indexpage, output): parser = IdxHlpHtmlParser(AbstractFormatter(AlmostNullWriter()), path, output) f = open(path + '/' + indexpage) parser.feed(f.read()) parser.close() f.close() def content(path, contentpage, output): parser = TocHlpHtmlParser(AbstractFormatter(AlmostNullWriter()), path, output) f = open(path + '/' + contentpage) parser.feed(f.read()) parser.close() f.close() def do_index(library, output): output.write('
      \n') for book in library: print '\t', book.title, '-', book.indexpage if book.indexpage: index(book.directory, book.indexpage, output) output.write('
    \n') def do_content(library, version, output): output.write(contents_header) for book in library: print '\t', book.title, '-', book.firstpage path = book.directory + "/" + book.firstpage output.write('
  • ') output.write(object_sitemap % (book.title, path)) if book.contentpage: content(book.directory, book.contentpage, output) output.write(contents_footer) # Fill in the [FILES] section of the project (.hhp) file. # 'library' is the list of directory description tuples from # supported_libraries for the version of the docs getting generated. def do_project(library, output, arch, version): output.write(project_template % locals()) pathseen = {} for book in library: directory = book.directory path = directory + '\\%s\n' for page in os.listdir(directory): if page.endswith('.html') or page.endswith('.css'): fullpath = path % page if fullpath not in pathseen: output.write(fullpath) pathseen[fullpath] = True def openfile(file): try: p = open(file, "w") except IOError, msg: print file, ":", msg sys.exit(1) return p def usage(): print usage_mode sys.exit(0) def do_it(args = None): if not args: args = sys.argv[1:] if not args: usage() try: optlist, args = getopt.getopt(args, 'ckpv:') except getopt.error, msg: print msg usage() if not args or len(args) > 1: usage() arch = args[0] version = None for opt in optlist: if opt[0] == '-v': version = opt[1] break if not version: usage() library = supported_libraries[version] if not (('-p','') in optlist): fname = arch + '.stp' f = openfile(fname) print "Building stoplist", fname, "..." words = stop_list.split() words.sort() for word in words: print >> f, word f.close() f = openfile(arch + '.hhp') print "Building Project..." do_project(library, f, arch, version) if version == '2.0.0': for image in os.listdir('icons'): f.write('icons'+ '\\' + image + '\n') f.close() if not (('-c','') in optlist): f = openfile(arch + '.hhc') print "Building Table of Content..." do_content(library, version, f) f.close() if not (('-k','') in optlist): f = openfile(arch + '.hhk') print "Building Index..." do_index(library, f) f.close() if __name__ == '__main__': do_it() python-old-doctools-2.5.5/Doc/tools/undoc_symbols.py0000644000175000017500000000476410061656016021231 0ustar dokodoko#! /usr/bin/env python """\ This script prints out a list of undocumented symbols found in Python include files, prefixed by their tag kind. Pass Python's include files to ctags, parse the output into a dictionary mapping symbol names to tag kinds. Then, the .tex files from Python docs are read into a giant string. Finally all symbols not found in the docs are written to standard output, prefixed with their tag kind. """ # Which kind of tags do we need? TAG_KINDS = "dpst" # Doc sections to use DOCSECTIONS = ["api"]# ["api", "ext"] # Only print symbols starting with this prefix, # to get all symbols, use an empty string PREFIXES = ("Py", "PY") INCLUDEPATTERN = "*.h" # end of customization section # Tested with EXUBERANT CTAGS # see http://ctags.sourceforge.net # # ctags fields are separated by tabs. # The first field is the name, the last field the type: # d macro definitions (and #undef names) # e enumerators # f function definitions # g enumeration names # m class, struct, or union members # n namespaces # p function prototypes and declarations # s structure names # t typedefs # u union names # v variable definitions # x extern and forward variable declarations import os, glob, re, sys def findnames(file, prefixes=()): names = {} for line in file.xreadlines(): if line[0] == '!': continue fields = line.split() name, tag = fields[0], fields[-1] if tag == 'd' and name.endswith('_H'): continue if prefixes: sw = name.startswith for prefix in prefixes: if sw(prefix): names[name] = tag else: names[name] = tag return names def print_undoc_symbols(prefix, docdir, incdir): docs = [] for sect in DOCSECTIONS: for file in glob.glob(os.path.join(docdir, sect, "*.tex")): docs.append(open(file).read()) docs = "\n".join(docs) incfiles = os.path.join(incdir, INCLUDEPATTERN) fp = os.popen("ctags -IPyAPI_FUNC -IPy_GCC_ATTRIBUTE --c-types=%s -f - %s" % (TAG_KINDS, incfiles)) dict = findnames(fp, prefix) names = dict.keys() names.sort() for name in names: if not re.search("%s\\W" % name, docs): print dict[name], name if __name__ == '__main__': srcdir = os.path.dirname(sys.argv[0]) incdir = os.path.normpath(os.path.join(srcdir, "../../Include")) docdir = os.path.normpath(os.path.join(srcdir, "..")) print_undoc_symbols(PREFIXES, docdir, incdir) python-old-doctools-2.5.5/Doc/tools/makesec.sh0000755000175000017500000000655607770235376017766 0ustar dokodoko#!/bin/sh # Simple little checker for individual libref manual sections # # usage: makesec.sh section # # This script builds the minimal file necessary to run a single section # through latex, does so, then converts the resulting dvi file to ps or pdf # and feeds the result into a viewer. It's by no means foolproof, but seems # to work okay for me (knock wood). It sure beats manually commenting out # most of the man lib.tex file and running everything manually. # It attempts to locate an appropriate dvi converter and viewer for the # selected output format. It understands the following environment # variables: # # PYSRC - refers to the root of your build tree (dir containing Doc) # DVICVT - refers to a dvi converter like dvips or dvipdf # VIEWER - refers to an appropriate viewer for the ps/pdf file # # Of the three, only PYSRC is currently required. The other two can be set # to specify unusual tools which perform those tasks. # Known issues: # - It would be nice if the script could determine PYSRC on its own. # - Something about \seealso{}s blows the latex stack, so they need # to be commented out for now. if [ x$PYSRC = x ] ; then echo "PYSRC must refer to the Python source tree" 1>&2 exit 1 fi if [ ! -d $PYSRC/Doc ] ; then echo "Can't find a Doc subdirectory in $PYSRC" 1>&2 exit 1 fi if [ "$#" -ne 1 ] ; then echo "Must specify a single libref manual section on cmd line" 1>&2 exit 1 fi # settle on a dvi converter if [ x$DVICVT != x ] ; then converter=$DVICVT ext=`echo $DVICVT | sed -e 's/^dvi//'` result=lib.$ext elif [ x`which dvipdf` != x ] ; then converter=`which dvipdf` ext=.pdf elif [ x`which dvips` != x ] ; then converter=`which dvips` ext=.ps else echo "Can't find a reasonable dvi converter" 1>&2 echo "Set DVICVT to refer to one" 1>&2 exit 1 fi # how about a viewer? if [ x$VIEWER != x ] ; then viewer=$VIEWER elif [ $ext = ".ps" -a x`which gv` != x ] ; then viewer=gv elif [ $ext = ".ps" -a x`which gs` != x ] ; then viewer=gs elif [ $ext = ".pdf" -a x`which acroread` != x ] ; then viewer=acroread elif [ $ext = ".pdf" -a "`uname`" = "Darwin" -a x`which open` != x ] ; then viewer=open elif [ $ext = ".pdf" -a x`which acroread` != x ] ; then viewer=acroread else echo "Can't find a reasonable viewer" 1>&2 echo "Set VIEWER to refer to one" 1>&2 exit 1 fi # make sure necessary links are in place for f in howto.cls pypaper.sty ; do rm -f $f ln -s $PYSRC/Doc/$f done export TEXINPUTS=.:$PYSRC/Doc/texinputs: # strip extension in case they gave full filename inp=`basename $1 .tex` # create the minimal framework necessary to run section through latex tmpf=lib.tex cat > $tmpf <\n') for i in range(percol): fp.write(" \n") for j in colnums: try: fp.write(" %s\n" % names[i + j]) except IndexError: pass fp.write(" \n") fp.write("\n") fp.write(string.rstrip(options.get_footer()) + "\n") fp.close() THANKS = '''\

    These people have contributed in some way to the Python documentation. This list is probably not complete -- if you feel that you or anyone else should be on this list, please let us know (send email to docs@python.org), and we will be glad to correct the problem.

    It is only with the input and contributions of the Python community that Python has such wonderful documentation -- Thank You!

    ''' if __name__ == "__main__": main() python-old-doctools-2.5.5/Doc/tools/rewrite.py0000644000175000017500000000252207737051231020024 0ustar dokodoko"""Simple script to replace @DATE@ and friends with real information. Usage: rewrite.py boilerplate.tex [VAR=value] ...