]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
typos, layout and other small things
authorGuido van Rossum <guido@python.org>
Mon, 10 Apr 1995 11:34:00 +0000 (11:34 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Apr 1995 11:34:00 +0000 (11:34 +0000)
44 files changed:
Doc/boilerplate.tex
Doc/info/texipre.dat
Doc/lib/libdbm.tex
Doc/lib/libftplib.tex
Doc/lib/libgdbm.tex
Doc/lib/libimp.tex
Doc/lib/libjpeg.tex
Doc/lib/libnntplib.tex
Doc/lib/libpickle.tex
Doc/lib/libposix.tex
Doc/lib/libposixfile.tex
Doc/lib/libprofile.tex
Doc/lib/libstring.tex
Doc/lib/libsun.tex
Doc/lib/libthread.tex
Doc/lib/libtypes.tex
Doc/lib/liburlparse.tex
Doc/libctb.tex
Doc/libdbm.tex
Doc/libftplib.tex
Doc/libgdbm.tex
Doc/libimp.tex
Doc/libjpeg.tex
Doc/libmacdnr.tex
Doc/libmacspeech.tex
Doc/libmactcp.tex
Doc/libnntplib.tex
Doc/libpickle.tex
Doc/libposix.tex
Doc/libposixfile.tex
Doc/libprofile.tex
Doc/libstring.tex
Doc/libsun.tex
Doc/libthread.tex
Doc/libtypes.tex
Doc/liburlparse.tex
Doc/mac/libctb.tex
Doc/mac/libmacdnr.tex
Doc/mac/libmacspeech.tex
Doc/mac/libmactcp.tex
Doc/texinputs/boilerplate.tex
Doc/texipre.dat
Doc/tut.tex
Doc/tut/tut.tex

index 89500c342b088fe01ed53ca8424aa07f43897e55..068e827c0b07a8c0f55c206d267770f57aa6df0f 100644 (file)
@@ -5,4 +5,4 @@
        E-mail: {\tt guido@cwi.nl}
 }
 
-\date{28 March 1995 \\ Release 1.2-proof-3} % XXX update before release!
+\date{10 April 1995 \\ Release 1.2} % XXX update before release!
index 93b4945007be6bceaef3a2cbf66fac27c6b53e7f..e6955e5a088b6886d81acd5c620f9c7f333de92c 100644 (file)
@@ -77,7 +77,7 @@ the language, see the @cite{Python Tutorial}.  The @cite{Python
 Reference Manual} gives a more formal definition of the language.
 (These manuals are not yet available in INFO or Texinfo format.)
 
-This version corresponds to Python version 1.2.
+This version corresponds to Python version 1.2 (4 April 1995).
 
 @end ifinfo
 
index 6e7256747d3226398f6289041d8e9dc4cf544ab4..7e004d28dd89edaa89e4dc318eef575b86028b18 100644 (file)
@@ -18,7 +18,8 @@ raised for general mapping errors like specifying an incorrect key.
 \begin{funcdesc}{open}{filename\, rwmode\, filemode}
 Open a dbm database and return a mapping object.  \var{filename} is
 the name of the database file (without the \file{.dir} or \file{.pag}
-extensions), \var{rwmode} is \code{'r'}, \code{'w'} or \code{'rw'} as for
-\code{open}, and \var{filemode} is the \UNIX{} mode of the file, used only
-when the database has to be created.
+extensions), \var{rwmode} is \code{'r'}, \code{'w'} or \code{'rw'} to
+open the database fore reading, writing or both respectively,
+and \var{filemode} is the \UNIX{} mode of the file, used only
+when the database has to be created (but to be supplied at all times).
 \end{funcdesc}
index f78805c386dca75835a8d27ef9de1513b62e82f2..63cde96c2dcb968923b699efece8031e9bc0d314 100644 (file)
@@ -16,7 +16,7 @@ Here's a sample session using the \code{ftplib} module:
 \begin{verbatim}
 >>> from ftplib import FTP
 >>> ftp = FTP('ftp.cwi.nl')   # connect to host, default port
->>> ftp.login()               # default user anonymous, passwd user@hostname
+>>> ftp.login()               # user anonymous, passwd user@hostname
 >>> ftp.retrlines('LIST')     # list directory contents
 total 24418
 drwxrwsr-x   5 ftp-usr  pdmaint     1536 Mar 20 09:48 .
index 177627f13f00fd64ed9395b3e931046ad495fcf1..f353b5e931c9900a18ee751f50daa78526a9e895 100644 (file)
@@ -18,13 +18,14 @@ raised for general mapping errors like specifying an incorrect key.
 \end{excdesc}
 
 \begin{funcdesc}{open}{filename\, rwmode\, filemode}
-Open a gdbm database and return a mapping object. \var{filename} is
+Open a gdbm database and return a mapping object.  \var{filename} is
 the name of the database file, \var{rwmode} is \code{'r'}, \code{'w'},
 \code{'c'}, or \code{'n'} for reader, writer (this also gives read
 access), create (writer, but create the database if it doesn't already
-exist) and newdb (which will always create a new database). Only one
-writer may open a gdbm file and many readers may open the file. Readers
-and writers cannot open the gdbm file at the same time. Note that the
-\code{GDBM_FAST} mode of opening the database is not supported. \var{filemode} 
-is the \UNIX\ mode of the file, used only when a database is created.
+exist) and newdb (which will always create a new database).  Only one
+writer may open a gdbm file and many readers may open the file.  Readers
+and writers cannot open the gdbm file at the same time.  Note that the
+\code{GDBM_FAST} mode of opening the database is not supported.
+\var{filemode} is the \UNIX\ mode of the file, used only when a
+database is created (but to be supplied at all times).
 \end{funcdesc}
index f995979abbae76344cb72f13f72a75e805de1b1e..2e72602b4e147fa0cae16c80706ee1fea0ffa79e 100644 (file)
@@ -142,7 +142,7 @@ def __import__(name, globals=None, locals=None, fromlist=None):
         return sys.modules[name]
 
     # If any of the following calls raises an exception,
-    # there's a problem we con't handle -- let the caller handle it.
+    # there's a problem we can't handle -- let the caller handle it.
 
     # See if it's a built-in module.
     m = imp.init_builtin(name)
index b5c14a4bf24622363bfd2d04ee08b49bc158e2be..8215cada56385bf879e9b6b915a382b13c85053e 100644 (file)
@@ -14,7 +14,7 @@ The \code{jpeg} module defines these functions:
 Treat data as a pixmap of width \var{w} and height \var{h}, with \var{b} bytes per
 pixel.  The data is in SGI GL order, so the first pixel is in the
 lower-left corner. This means that \code{lrectread} return data can
-immedeately be passed to compress.  Currently only 1 byte and 4 byte
+immediately be passed to compress.  Currently only 1 byte and 4 byte
 pixels are allowed, the former being treated as greyscale and the
 latter as RGB color.  Compress returns a string that contains the
 compressed picture, in JFIF format.
index d2db0d54d0060c88bfc1fcfea3ed2478121eff0a..e17ea8b48829b0c908a1f0071b7954dd6abd2a39 100644 (file)
@@ -12,6 +12,7 @@ Here are two small examples of how it can be used.  To list some
 statistics about a newsgroup and print the subjects of the last 10
 articles:
 
+\small{
 \begin{verbatim}
 >>> s = NNTP('news.cwi.nl')
 >>> resp, count, first, last, name = s.group('comp.lang.python')
@@ -34,6 +35,7 @@ Group comp.lang.python has 59 articles, range 3742 to 3803
 '205 news.cwi.nl closing connection.  Goodbye.'
 >>> 
 \end{verbatim}
+}
 
 To post an article from a file (this assumes that the article has
 valid headers):
index 92020a20852e6badf1a3e74d1a4d9c84a166dba6..579992f049d5ad9fbd2604cc376a64a257047fa8 100644 (file)
@@ -146,7 +146,7 @@ To unpickle an object \code{x} from a file \code{f}, open for reading:
 
 \begin{verbatim}
 u = pickle.Unpickler(f)
-x = u.load(x)
+x = u.load()
 \end{verbatim}
 
 A shorthand is:
index fa0b42d23913af4bf839f3ed46d6f8a2bf050708..71798a4780d87ed53abca17e9b002dc228122c9e 100644 (file)
@@ -16,7 +16,8 @@ through the \code{os} interface.  Once \code{os} is imported, there is
 \stmodindex{os}
 
 The descriptions below are very terse; refer to the
-corresponding \UNIX{} manual entry for more information.
+corresponding \UNIX{} manual entry for more information.  Arguments
+called \var{path} refer to a pathname given as a string.
 
 Errors are reported as exceptions; the usual exceptions are given
 for type errors, while errors reported by the system calls raise
@@ -340,7 +341,7 @@ Wait for completion of a child process given by proces id, and return
 a tuple containing its pid and exit status indication (encoded as by
 \UNIX{}).  The semantics of the call are affected by the value of
 the integer options, which should be 0 for normal operation.  (If the
-system does not support waitpid(), this always raises
+system does not support \code{waitpid()}, this always raises
 \code{posix.error}.  Not on MS-DOS.)
 \end{funcdesc}
 
index b257bbd05ae573d560e478c2ba2d8970c0ef6af3..6679f122807cf86270ce06a746f362d57df26d6b 100644 (file)
@@ -63,11 +63,12 @@ The posixfile object defines the following additional methods:
  manual page on your system.
 \end{funcdesc}
 
-\begin{funcdesc}{flags}{fmt}
+\begin{funcdesc}{flags}{\optional{flags}}
  Set the specified flags for the file that the file object is referring
  to.  The new flags are ORed with the old flags, unless specified
  otherwise.  The format is explained below in a table.  Without
- arguments a string indicating the current flags is returned (this is
+ the \var{flags} argument
+ a string indicating the current flags is returned (this is
  the same as the '?' modifier).  For more information about the flags
  refer to the fcntl manual page on your system.
 \end{funcdesc}
index 3cd4296211b8b7ee47d4335c4f7363a63f6e75a2..ea2e6130e948baa16d85311e6ee0787c89ed9a4a 100644 (file)
@@ -267,17 +267,19 @@ function automatically prints a simple profiling report, sorted by the
 standard name string (file/line/function-name) that is presented in
 each line.  The following is a typical output from such a call:
 
+\small{
 \begin{verbatim}
-         main()
-         2706 function calls (2004 primitive calls) in 4.504 CPU seconds
+      main()
+      2706 function calls (2004 primitive calls) in 4.504 CPU seconds
 
-   Ordered by: standard name
+Ordered by: standard name
 
-   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
-        2    0.006    0.003    0.953    0.477 pobject.py:75(save_objects)
-     43/3    0.533    0.012    0.749    0.250 pobject.py:99(evaluate)
   ...
+ncalls  tottime  percall  cumtime  percall filename:lineno(function)
+     2    0.006    0.003    0.953    0.477 pobject.py:75(save_objects)
+  43/3    0.533    0.012    0.749    0.250 pobject.py:99(evaluate)
+ ...
 \end{verbatim}
+}
 
 The first line indicates that this profile was generated by the call:\\
 \code{profile.run('main()')}, and hence the exec'ed string is
@@ -318,6 +320,7 @@ then the latter is the number of primitive calls, and the former is
 the actual number of calls.  Note that when the function does not
 recurse, these two values are the same, and only the single figure is
 printed.
+
 \end{funcdesc}
 
 \begin{funcdesc}{pstats.Stats}{filename\optional{\, ...}}
@@ -480,7 +483,8 @@ return the instance that is being processed, so that the commands can
 be strung together.  For example:
 
 \begin{verbatim}
-pstats.Stats('foofile').strip_dirs().sort_stats('cum').print_stats().ignore()
+pstats.Stats('foofile').strip_dirs().sort_stats('cum') \
+                       .print_stats().ignore()
 \end{verbatim}
 
 would perform all the indicated functions, but it would not return
index 960e94b6e776729f05a198ece1fe6f7dc6c30d64..17717dfd256ce5bc441a9fe39ade7503bd269d0d 100644 (file)
@@ -70,7 +70,7 @@ string (after stripping the sign): \samp{0x} or \samp{0X} means 16,
 \samp{0} means 8, anything else means 10.  If \var{base} is 16, a
 leading \samp{0x} or \samp{0X} is always accepted.  (Note: for a more
 flexible interpretation of numeric literals, use the built-in function
-\code{eval()}.
+\code{eval()}.)
 \bifuncindex{eval}
 \end{funcdesc}
 
index 56283695fb656809e639aa53bdc7482f7018d993..909c14dc955d92ef04411991951252c02c5f5c06 100644 (file)
@@ -97,7 +97,7 @@ possibly modified by the program.
 
 \begin{funcdesc}{write}{samples}
 Write is passed a python string containing audio samples to be played.
-If there is enough buffer space free it will immedeately return,
+If there is enough buffer space free it will immediately return,
 otherwise it will block.
 \end{funcdesc}
 
index bd81d7cf1cbab4b102cd4dee808836336a6ad31a..f7453844dbe5e8f7985f74ab012f6fedc6efbea5 100644 (file)
@@ -58,7 +58,7 @@ another thread is created.
 Lock objects have the following methods:
 
 \renewcommand{\indexsubitem}{(lock method)}
-\begin{funcdesc}{acquire}{waitflag}
+\begin{funcdesc}{acquire}{\optional{waitflag}}
 Without the optional argument, this method acquires the lock
 unconditionally, if necessary waiting until it is released by another
 thread (only one thread at a time can acquire a lock --- that's their
index 422a2d6a5687886e469e745c80af5b31239c1209..248ad6e4a1392aad2b33c10a8177cca93eb73898 100644 (file)
@@ -305,7 +305,7 @@ operations.  The \samp{+} and \samp{*} operations have the same
 priority as the corresponding numeric operations.\footnote{They must
 have since the parser can't tell the type of the operands.}
 
-This table lists the sequece operations sorted in ascending priority
+This table lists the sequence operations sorted in ascending priority
 (operations in the same box have the same priority).  In the table,
 \var{s} and \var{t} are sequences of the same type; \var{n}, \var{i}
 and \var{j} are integers:
index c35d032c661d03f2497350583d0df167a8fb6d63..36ca949ba63a3b579179a4f29e82fef50f0b4e4e 100644 (file)
@@ -33,9 +33,16 @@ except for a leading slash in the \var{path} component, which is
 retained if present.
 
 Example:
-\code{urlparse('http://www.cwi.nl:80/\%7eguido/Python.html')}
+
+\begin{verbatim}
+urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
+\end{verbatim}
+
 yields the tuple
-\code{('http', 'www.cwi.nl:80', '/\%7eguido/Python.html', '', '', '')}.
+
+\begin{verbatim}
+('http', 'www.cwi.nl:80', '/%7Eguido/Python.html', '', '', '')
+\end{verbatim}
 
 If the \var{default_scheme} argument is specified, it gives the
 default addressing scheme, to be used only if the URL string does not
@@ -61,9 +68,16 @@ the network location and (part of) the path, to provide missing
 components in the relative URL.
 
 Example:
-\code{urljoin('http://www.cwi.nl/\%7eguido/Python.html',}
-\code{'FAQ.html')} yields the string
-\code{'http://www.cwi.nl/\%7eguido/FAQ.html'}.
+
+\begin{verbatim}
+urljoin('http://www.cwi.nl/%7Eguido/Python.html', 'FAQ.html')
+\end{verbatim}
+
+yields the string
+
+\begin{verbatim}
+'http://www.cwi.nl/%7Eguido/FAQ.html'
+\end{verbatim}
 
 The \var{allow_fragments} argument has the same meaning as for
 \code{urlparse}.
index 1cda336810548eeb096d6a286dfb9574013cfc3e..a5aab7142167eff43cd9bf834f190c0cd2bd9b42 100644 (file)
@@ -4,7 +4,7 @@
 
 This module provides a partial interface to the Macintosh
 Communications Toolbox. Currently, only Connection Manager tools are
-supported. 
+supported.  It may not be available in all Mac Python versions.
 
 \begin{datadesc}{error}
 The exception raised on errors.
index 6e7256747d3226398f6289041d8e9dc4cf544ab4..7e004d28dd89edaa89e4dc318eef575b86028b18 100644 (file)
@@ -18,7 +18,8 @@ raised for general mapping errors like specifying an incorrect key.
 \begin{funcdesc}{open}{filename\, rwmode\, filemode}
 Open a dbm database and return a mapping object.  \var{filename} is
 the name of the database file (without the \file{.dir} or \file{.pag}
-extensions), \var{rwmode} is \code{'r'}, \code{'w'} or \code{'rw'} as for
-\code{open}, and \var{filemode} is the \UNIX{} mode of the file, used only
-when the database has to be created.
+extensions), \var{rwmode} is \code{'r'}, \code{'w'} or \code{'rw'} to
+open the database fore reading, writing or both respectively,
+and \var{filemode} is the \UNIX{} mode of the file, used only
+when the database has to be created (but to be supplied at all times).
 \end{funcdesc}
index f78805c386dca75835a8d27ef9de1513b62e82f2..63cde96c2dcb968923b699efece8031e9bc0d314 100644 (file)
@@ -16,7 +16,7 @@ Here's a sample session using the \code{ftplib} module:
 \begin{verbatim}
 >>> from ftplib import FTP
 >>> ftp = FTP('ftp.cwi.nl')   # connect to host, default port
->>> ftp.login()               # default user anonymous, passwd user@hostname
+>>> ftp.login()               # user anonymous, passwd user@hostname
 >>> ftp.retrlines('LIST')     # list directory contents
 total 24418
 drwxrwsr-x   5 ftp-usr  pdmaint     1536 Mar 20 09:48 .
index 177627f13f00fd64ed9395b3e931046ad495fcf1..f353b5e931c9900a18ee751f50daa78526a9e895 100644 (file)
@@ -18,13 +18,14 @@ raised for general mapping errors like specifying an incorrect key.
 \end{excdesc}
 
 \begin{funcdesc}{open}{filename\, rwmode\, filemode}
-Open a gdbm database and return a mapping object. \var{filename} is
+Open a gdbm database and return a mapping object.  \var{filename} is
 the name of the database file, \var{rwmode} is \code{'r'}, \code{'w'},
 \code{'c'}, or \code{'n'} for reader, writer (this also gives read
 access), create (writer, but create the database if it doesn't already
-exist) and newdb (which will always create a new database). Only one
-writer may open a gdbm file and many readers may open the file. Readers
-and writers cannot open the gdbm file at the same time. Note that the
-\code{GDBM_FAST} mode of opening the database is not supported. \var{filemode} 
-is the \UNIX\ mode of the file, used only when a database is created.
+exist) and newdb (which will always create a new database).  Only one
+writer may open a gdbm file and many readers may open the file.  Readers
+and writers cannot open the gdbm file at the same time.  Note that the
+\code{GDBM_FAST} mode of opening the database is not supported.
+\var{filemode} is the \UNIX\ mode of the file, used only when a
+database is created (but to be supplied at all times).
 \end{funcdesc}
index f995979abbae76344cb72f13f72a75e805de1b1e..2e72602b4e147fa0cae16c80706ee1fea0ffa79e 100644 (file)
@@ -142,7 +142,7 @@ def __import__(name, globals=None, locals=None, fromlist=None):
         return sys.modules[name]
 
     # If any of the following calls raises an exception,
-    # there's a problem we con't handle -- let the caller handle it.
+    # there's a problem we can't handle -- let the caller handle it.
 
     # See if it's a built-in module.
     m = imp.init_builtin(name)
index b5c14a4bf24622363bfd2d04ee08b49bc158e2be..8215cada56385bf879e9b6b915a382b13c85053e 100644 (file)
@@ -14,7 +14,7 @@ The \code{jpeg} module defines these functions:
 Treat data as a pixmap of width \var{w} and height \var{h}, with \var{b} bytes per
 pixel.  The data is in SGI GL order, so the first pixel is in the
 lower-left corner. This means that \code{lrectread} return data can
-immedeately be passed to compress.  Currently only 1 byte and 4 byte
+immediately be passed to compress.  Currently only 1 byte and 4 byte
 pixels are allowed, the former being treated as greyscale and the
 latter as RGB color.  Compress returns a string that contains the
 compressed picture, in JFIF format.
index cd3625c60afa47cb2dfa95a2cc8faf33b9720752..ab457882107d7148f52a159c9add77a23df5517a 100644 (file)
@@ -3,57 +3,58 @@
 \bimodindex{macdnr}
 
 This module provides an interface to the Macintosh Domain Name
-Resolver. It is usually used in conjunction with the \var{mactcp} module, to
-map hostnames to IP-addresses.
+Resolver.  It is usually used in conjunction with the \var{mactcp}
+module, to map hostnames to IP-addresses.  It may not be available in
+all Mac Python versions.
 
 The \code{macdnr} module defines the following functions:
 
 \renewcommand{\indexsubitem}{(in module macdnr)}
 
 \begin{funcdesc}{Open}{\optional{filename}}
-Open the domain name resolver extension. If \var{filename} is given it
+Open the domain name resolver extension.  If \var{filename} is given it
 should be the pathname of the extension, otherwise a default is
-used. Normally, this call is not needed since the other calls will
+used.  Normally, this call is not needed since the other calls will
 open the extension automatically.
 \end{funcdesc}
 
 \begin{funcdesc}{Close}{}
-Close the resolver extension. Again, not needed for normal use.
+Close the resolver extension.  Again, not needed for normal use.
 \end{funcdesc}
 
 \begin{funcdesc}{StrToAddr}{hostname}
-Look up the IP address for \var{hostname}. This call returns a dnr
+Look up the IP address for \var{hostname}.  This call returns a dnr
 result object of the ``address'' variation.
 \end{funcdesc}
 
 \begin{funcdesc}{AddrToName}{addr}
 Do a reverse lookup on the 32-bit integer IP-address
-\var{addr}. Returns a dnr result object of the ``address'' variation.
+\var{addr}.  Returns a dnr result object of the ``address'' variation.
 \end{funcdesc}
 
 \begin{funcdesc}{AddrToStr}{addr}
 Convert the 32-bit integer IP-address \var{addr} to a dotted-decimal
-string. Returns the string.
+string.  Returns the string.
 \end{funcdesc}
 
 \begin{funcdesc}{HInfo}{hostname}
 Query the nameservers for a \code{HInfo} record for host
-\var{hostname}. These records contain hardware and software
+\var{hostname}.  These records contain hardware and software
 information about the machine in question (if they are available in
-the first place). Returns a dnr result object of the ``hinfo''
+the first place).  Returns a dnr result object of the ``hinfo''
 variety.
 \end{funcdesc}
 
 \begin{funcdesc}{MXInfo}{domain}
-Query the nameservers for a mail exchanger for \var{domain}. This is
+Query the nameservers for a mail exchanger for \var{domain}.  This is
 the hostname of a host willing to accept SMTP mail for the given
-domain. Returns a dnr result object of the ``mx'' variety.
+domain.  Returns a dnr result object of the ``mx'' variety.
 \end{funcdesc}
 
 \subsection{dnr result object}
 
 Since the DNR calls all execute asynchronously you do not get the
-results back immedeately. In stead, you get a dnr result object. You
+results back immediately.  Instead, you get a dnr result object.  You
 can check this object to see whether the query is complete, and access
 its attributes to obtain the information when it is.
 
@@ -89,23 +90,23 @@ The canonical name of the host that was queried.
 \dataline{ip1}
 \dataline{ip2}
 \dataline{ip3}
-At most four integer IP addresses for this host. Unused entries are
-zero. Valid only for address queries.
+At most four integer IP addresses for this host.  Unused entries are
+zero.  Valid only for address queries.
 \end{datadesc}
 
 \begin{datadesc}{cpuType}
 \dataline{osType}
-Textual strings giving the machine type an OS name. Valid for hinfo
+Textual strings giving the machine type an OS name.  Valid for hinfo
 queries.
 \end{datadesc}
 
 \begin{datadesc}{exchange}
-The name of a mail-exchanger host. Valid for mx queries.
+The name of a mail-exchanger host.  Valid for mx queries.
 \end{datadesc}
 
 \begin{datadesc}{preference}
-The preference of this mx record. Not too useful, since the Macintosh
-will only return a single mx record. Mx queries only.
+The preference of this mx record.  Not too useful, since the Macintosh
+will only return a single mx record.  Mx queries only.
 \end{datadesc}
 
 The simplest way to use the module to convert names to dotted-decimal
index 7480482c743772b1e1436271a2b01d4a0b9d69ed..fc35520b64581e2c66a152c4a17d254b3481316e 100644 (file)
@@ -7,7 +7,8 @@ This module provides an interface to the Macintosh Speech Manager,
 allowing you to let the Macintosh utter phrases. You need a version of
 the speech manager extension (version 1 and 2 have been tested) in
 your \code{Extensions} folder for this to work. The module does not
-provide full access to all features of the Speech Manager yet.
+provide full access to all features of the Speech Manager yet.  It may
+not be available in all Mac Python versions.
 
 \begin{funcdesc}{Available}{}
 Test availability of the Speech Manager extension (and, on the
index 561284b4341142a91cfba19cb03132705072cc14..6c5a78bf60b878c4cd2703eeff0c3ceee4fff2d2 100644 (file)
@@ -8,7 +8,8 @@ MacTCP\@. There is an accompanying module \code{macdnr} which provides an
 interface to the name-server (allowing you to translate hostnames to
 ip-addresses), a module \code{MACTCP} which has symbolic names for
 constants constants used by MacTCP and a wrapper module \code{socket}
-which mimics the \UNIX{} socket interface (as far as possible).
+which mimics the \UNIX{} socket interface (as far as possible).  It may
+not be available in all Mac Python versions.
 
 A complete description of the MacTCP interface can be found in the
 Apple MacTCP API documentation.
index d2db0d54d0060c88bfc1fcfea3ed2478121eff0a..e17ea8b48829b0c908a1f0071b7954dd6abd2a39 100644 (file)
@@ -12,6 +12,7 @@ Here are two small examples of how it can be used.  To list some
 statistics about a newsgroup and print the subjects of the last 10
 articles:
 
+\small{
 \begin{verbatim}
 >>> s = NNTP('news.cwi.nl')
 >>> resp, count, first, last, name = s.group('comp.lang.python')
@@ -34,6 +35,7 @@ Group comp.lang.python has 59 articles, range 3742 to 3803
 '205 news.cwi.nl closing connection.  Goodbye.'
 >>> 
 \end{verbatim}
+}
 
 To post an article from a file (this assumes that the article has
 valid headers):
index 92020a20852e6badf1a3e74d1a4d9c84a166dba6..579992f049d5ad9fbd2604cc376a64a257047fa8 100644 (file)
@@ -146,7 +146,7 @@ To unpickle an object \code{x} from a file \code{f}, open for reading:
 
 \begin{verbatim}
 u = pickle.Unpickler(f)
-x = u.load(x)
+x = u.load()
 \end{verbatim}
 
 A shorthand is:
index fa0b42d23913af4bf839f3ed46d6f8a2bf050708..71798a4780d87ed53abca17e9b002dc228122c9e 100644 (file)
@@ -16,7 +16,8 @@ through the \code{os} interface.  Once \code{os} is imported, there is
 \stmodindex{os}
 
 The descriptions below are very terse; refer to the
-corresponding \UNIX{} manual entry for more information.
+corresponding \UNIX{} manual entry for more information.  Arguments
+called \var{path} refer to a pathname given as a string.
 
 Errors are reported as exceptions; the usual exceptions are given
 for type errors, while errors reported by the system calls raise
@@ -340,7 +341,7 @@ Wait for completion of a child process given by proces id, and return
 a tuple containing its pid and exit status indication (encoded as by
 \UNIX{}).  The semantics of the call are affected by the value of
 the integer options, which should be 0 for normal operation.  (If the
-system does not support waitpid(), this always raises
+system does not support \code{waitpid()}, this always raises
 \code{posix.error}.  Not on MS-DOS.)
 \end{funcdesc}
 
index b257bbd05ae573d560e478c2ba2d8970c0ef6af3..6679f122807cf86270ce06a746f362d57df26d6b 100644 (file)
@@ -63,11 +63,12 @@ The posixfile object defines the following additional methods:
  manual page on your system.
 \end{funcdesc}
 
-\begin{funcdesc}{flags}{fmt}
+\begin{funcdesc}{flags}{\optional{flags}}
  Set the specified flags for the file that the file object is referring
  to.  The new flags are ORed with the old flags, unless specified
  otherwise.  The format is explained below in a table.  Without
- arguments a string indicating the current flags is returned (this is
+ the \var{flags} argument
+ a string indicating the current flags is returned (this is
  the same as the '?' modifier).  For more information about the flags
  refer to the fcntl manual page on your system.
 \end{funcdesc}
index 3cd4296211b8b7ee47d4335c4f7363a63f6e75a2..ea2e6130e948baa16d85311e6ee0787c89ed9a4a 100644 (file)
@@ -267,17 +267,19 @@ function automatically prints a simple profiling report, sorted by the
 standard name string (file/line/function-name) that is presented in
 each line.  The following is a typical output from such a call:
 
+\small{
 \begin{verbatim}
-         main()
-         2706 function calls (2004 primitive calls) in 4.504 CPU seconds
+      main()
+      2706 function calls (2004 primitive calls) in 4.504 CPU seconds
 
-   Ordered by: standard name
+Ordered by: standard name
 
-   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
-        2    0.006    0.003    0.953    0.477 pobject.py:75(save_objects)
-     43/3    0.533    0.012    0.749    0.250 pobject.py:99(evaluate)
   ...
+ncalls  tottime  percall  cumtime  percall filename:lineno(function)
+     2    0.006    0.003    0.953    0.477 pobject.py:75(save_objects)
+  43/3    0.533    0.012    0.749    0.250 pobject.py:99(evaluate)
+ ...
 \end{verbatim}
+}
 
 The first line indicates that this profile was generated by the call:\\
 \code{profile.run('main()')}, and hence the exec'ed string is
@@ -318,6 +320,7 @@ then the latter is the number of primitive calls, and the former is
 the actual number of calls.  Note that when the function does not
 recurse, these two values are the same, and only the single figure is
 printed.
+
 \end{funcdesc}
 
 \begin{funcdesc}{pstats.Stats}{filename\optional{\, ...}}
@@ -480,7 +483,8 @@ return the instance that is being processed, so that the commands can
 be strung together.  For example:
 
 \begin{verbatim}
-pstats.Stats('foofile').strip_dirs().sort_stats('cum').print_stats().ignore()
+pstats.Stats('foofile').strip_dirs().sort_stats('cum') \
+                       .print_stats().ignore()
 \end{verbatim}
 
 would perform all the indicated functions, but it would not return
index 960e94b6e776729f05a198ece1fe6f7dc6c30d64..17717dfd256ce5bc441a9fe39ade7503bd269d0d 100644 (file)
@@ -70,7 +70,7 @@ string (after stripping the sign): \samp{0x} or \samp{0X} means 16,
 \samp{0} means 8, anything else means 10.  If \var{base} is 16, a
 leading \samp{0x} or \samp{0X} is always accepted.  (Note: for a more
 flexible interpretation of numeric literals, use the built-in function
-\code{eval()}.
+\code{eval()}.)
 \bifuncindex{eval}
 \end{funcdesc}
 
index 56283695fb656809e639aa53bdc7482f7018d993..909c14dc955d92ef04411991951252c02c5f5c06 100644 (file)
@@ -97,7 +97,7 @@ possibly modified by the program.
 
 \begin{funcdesc}{write}{samples}
 Write is passed a python string containing audio samples to be played.
-If there is enough buffer space free it will immedeately return,
+If there is enough buffer space free it will immediately return,
 otherwise it will block.
 \end{funcdesc}
 
index bd81d7cf1cbab4b102cd4dee808836336a6ad31a..f7453844dbe5e8f7985f74ab012f6fedc6efbea5 100644 (file)
@@ -58,7 +58,7 @@ another thread is created.
 Lock objects have the following methods:
 
 \renewcommand{\indexsubitem}{(lock method)}
-\begin{funcdesc}{acquire}{waitflag}
+\begin{funcdesc}{acquire}{\optional{waitflag}}
 Without the optional argument, this method acquires the lock
 unconditionally, if necessary waiting until it is released by another
 thread (only one thread at a time can acquire a lock --- that's their
index 422a2d6a5687886e469e745c80af5b31239c1209..248ad6e4a1392aad2b33c10a8177cca93eb73898 100644 (file)
@@ -305,7 +305,7 @@ operations.  The \samp{+} and \samp{*} operations have the same
 priority as the corresponding numeric operations.\footnote{They must
 have since the parser can't tell the type of the operands.}
 
-This table lists the sequece operations sorted in ascending priority
+This table lists the sequence operations sorted in ascending priority
 (operations in the same box have the same priority).  In the table,
 \var{s} and \var{t} are sequences of the same type; \var{n}, \var{i}
 and \var{j} are integers:
index c35d032c661d03f2497350583d0df167a8fb6d63..36ca949ba63a3b579179a4f29e82fef50f0b4e4e 100644 (file)
@@ -33,9 +33,16 @@ except for a leading slash in the \var{path} component, which is
 retained if present.
 
 Example:
-\code{urlparse('http://www.cwi.nl:80/\%7eguido/Python.html')}
+
+\begin{verbatim}
+urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
+\end{verbatim}
+
 yields the tuple
-\code{('http', 'www.cwi.nl:80', '/\%7eguido/Python.html', '', '', '')}.
+
+\begin{verbatim}
+('http', 'www.cwi.nl:80', '/%7Eguido/Python.html', '', '', '')
+\end{verbatim}
 
 If the \var{default_scheme} argument is specified, it gives the
 default addressing scheme, to be used only if the URL string does not
@@ -61,9 +68,16 @@ the network location and (part of) the path, to provide missing
 components in the relative URL.
 
 Example:
-\code{urljoin('http://www.cwi.nl/\%7eguido/Python.html',}
-\code{'FAQ.html')} yields the string
-\code{'http://www.cwi.nl/\%7eguido/FAQ.html'}.
+
+\begin{verbatim}
+urljoin('http://www.cwi.nl/%7Eguido/Python.html', 'FAQ.html')
+\end{verbatim}
+
+yields the string
+
+\begin{verbatim}
+'http://www.cwi.nl/%7Eguido/FAQ.html'
+\end{verbatim}
 
 The \var{allow_fragments} argument has the same meaning as for
 \code{urlparse}.
index 1cda336810548eeb096d6a286dfb9574013cfc3e..a5aab7142167eff43cd9bf834f190c0cd2bd9b42 100644 (file)
@@ -4,7 +4,7 @@
 
 This module provides a partial interface to the Macintosh
 Communications Toolbox. Currently, only Connection Manager tools are
-supported. 
+supported.  It may not be available in all Mac Python versions.
 
 \begin{datadesc}{error}
 The exception raised on errors.
index cd3625c60afa47cb2dfa95a2cc8faf33b9720752..ab457882107d7148f52a159c9add77a23df5517a 100644 (file)
@@ -3,57 +3,58 @@
 \bimodindex{macdnr}
 
 This module provides an interface to the Macintosh Domain Name
-Resolver. It is usually used in conjunction with the \var{mactcp} module, to
-map hostnames to IP-addresses.
+Resolver.  It is usually used in conjunction with the \var{mactcp}
+module, to map hostnames to IP-addresses.  It may not be available in
+all Mac Python versions.
 
 The \code{macdnr} module defines the following functions:
 
 \renewcommand{\indexsubitem}{(in module macdnr)}
 
 \begin{funcdesc}{Open}{\optional{filename}}
-Open the domain name resolver extension. If \var{filename} is given it
+Open the domain name resolver extension.  If \var{filename} is given it
 should be the pathname of the extension, otherwise a default is
-used. Normally, this call is not needed since the other calls will
+used.  Normally, this call is not needed since the other calls will
 open the extension automatically.
 \end{funcdesc}
 
 \begin{funcdesc}{Close}{}
-Close the resolver extension. Again, not needed for normal use.
+Close the resolver extension.  Again, not needed for normal use.
 \end{funcdesc}
 
 \begin{funcdesc}{StrToAddr}{hostname}
-Look up the IP address for \var{hostname}. This call returns a dnr
+Look up the IP address for \var{hostname}.  This call returns a dnr
 result object of the ``address'' variation.
 \end{funcdesc}
 
 \begin{funcdesc}{AddrToName}{addr}
 Do a reverse lookup on the 32-bit integer IP-address
-\var{addr}. Returns a dnr result object of the ``address'' variation.
+\var{addr}.  Returns a dnr result object of the ``address'' variation.
 \end{funcdesc}
 
 \begin{funcdesc}{AddrToStr}{addr}
 Convert the 32-bit integer IP-address \var{addr} to a dotted-decimal
-string. Returns the string.
+string.  Returns the string.
 \end{funcdesc}
 
 \begin{funcdesc}{HInfo}{hostname}
 Query the nameservers for a \code{HInfo} record for host
-\var{hostname}. These records contain hardware and software
+\var{hostname}.  These records contain hardware and software
 information about the machine in question (if they are available in
-the first place). Returns a dnr result object of the ``hinfo''
+the first place).  Returns a dnr result object of the ``hinfo''
 variety.
 \end{funcdesc}
 
 \begin{funcdesc}{MXInfo}{domain}
-Query the nameservers for a mail exchanger for \var{domain}. This is
+Query the nameservers for a mail exchanger for \var{domain}.  This is
 the hostname of a host willing to accept SMTP mail for the given
-domain. Returns a dnr result object of the ``mx'' variety.
+domain.  Returns a dnr result object of the ``mx'' variety.
 \end{funcdesc}
 
 \subsection{dnr result object}
 
 Since the DNR calls all execute asynchronously you do not get the
-results back immedeately. In stead, you get a dnr result object. You
+results back immediately.  Instead, you get a dnr result object.  You
 can check this object to see whether the query is complete, and access
 its attributes to obtain the information when it is.
 
@@ -89,23 +90,23 @@ The canonical name of the host that was queried.
 \dataline{ip1}
 \dataline{ip2}
 \dataline{ip3}
-At most four integer IP addresses for this host. Unused entries are
-zero. Valid only for address queries.
+At most four integer IP addresses for this host.  Unused entries are
+zero.  Valid only for address queries.
 \end{datadesc}
 
 \begin{datadesc}{cpuType}
 \dataline{osType}
-Textual strings giving the machine type an OS name. Valid for hinfo
+Textual strings giving the machine type an OS name.  Valid for hinfo
 queries.
 \end{datadesc}
 
 \begin{datadesc}{exchange}
-The name of a mail-exchanger host. Valid for mx queries.
+The name of a mail-exchanger host.  Valid for mx queries.
 \end{datadesc}
 
 \begin{datadesc}{preference}
-The preference of this mx record. Not too useful, since the Macintosh
-will only return a single mx record. Mx queries only.
+The preference of this mx record.  Not too useful, since the Macintosh
+will only return a single mx record.  Mx queries only.
 \end{datadesc}
 
 The simplest way to use the module to convert names to dotted-decimal
index 7480482c743772b1e1436271a2b01d4a0b9d69ed..fc35520b64581e2c66a152c4a17d254b3481316e 100644 (file)
@@ -7,7 +7,8 @@ This module provides an interface to the Macintosh Speech Manager,
 allowing you to let the Macintosh utter phrases. You need a version of
 the speech manager extension (version 1 and 2 have been tested) in
 your \code{Extensions} folder for this to work. The module does not
-provide full access to all features of the Speech Manager yet.
+provide full access to all features of the Speech Manager yet.  It may
+not be available in all Mac Python versions.
 
 \begin{funcdesc}{Available}{}
 Test availability of the Speech Manager extension (and, on the
index 561284b4341142a91cfba19cb03132705072cc14..6c5a78bf60b878c4cd2703eeff0c3ceee4fff2d2 100644 (file)
@@ -8,7 +8,8 @@ MacTCP\@. There is an accompanying module \code{macdnr} which provides an
 interface to the name-server (allowing you to translate hostnames to
 ip-addresses), a module \code{MACTCP} which has symbolic names for
 constants constants used by MacTCP and a wrapper module \code{socket}
-which mimics the \UNIX{} socket interface (as far as possible).
+which mimics the \UNIX{} socket interface (as far as possible).  It may
+not be available in all Mac Python versions.
 
 A complete description of the MacTCP interface can be found in the
 Apple MacTCP API documentation.
index 89500c342b088fe01ed53ca8424aa07f43897e55..068e827c0b07a8c0f55c206d267770f57aa6df0f 100644 (file)
@@ -5,4 +5,4 @@
        E-mail: {\tt guido@cwi.nl}
 }
 
-\date{28 March 1995 \\ Release 1.2-proof-3} % XXX update before release!
+\date{10 April 1995 \\ Release 1.2} % XXX update before release!
index 93b4945007be6bceaef3a2cbf66fac27c6b53e7f..e6955e5a088b6886d81acd5c620f9c7f333de92c 100644 (file)
@@ -77,7 +77,7 @@ the language, see the @cite{Python Tutorial}.  The @cite{Python
 Reference Manual} gives a more formal definition of the language.
 (These manuals are not yet available in INFO or Texinfo format.)
 
-This version corresponds to Python version 1.2.
+This version corresponds to Python version 1.2 (4 April 1995).
 
 @end ifinfo
 
index bcb0c35f1a71393435b8d0f9ae0cc88bff3a5e4f..1822124ece98c59c0bcac6a8d3d34363c35a2e40 100644 (file)
@@ -2157,7 +2157,7 @@ names, and the outermost scope (searched last) is the name space
 containing built-in names.
 
 Usually, the local scope references the local names of the (textually)
-current function.  Outside of functions, the the local scope references
+current function.  Outside of functions, the local scope references
 the same name space as the global scope: the module's name space.
 Class definitions place yet another name space in the local scope.
 
@@ -2165,7 +2165,7 @@ It is important to realize that scopes are determined textually: the
 global scope of a function defined in a module is that module's name
 space, no matter from where or by what alias the function is called.
 On the other hand, the actual search for names is done dynamically, at
-run time --- however, the the language definition is evolving towards
+run time --- however, the language definition is evolving towards
 static name resolution, at ``compile'' time, so don't rely on dynamic
 name resolution!  (In fact, local variables are already determined
 statically.)
index bcb0c35f1a71393435b8d0f9ae0cc88bff3a5e4f..1822124ece98c59c0bcac6a8d3d34363c35a2e40 100644 (file)
@@ -2157,7 +2157,7 @@ names, and the outermost scope (searched last) is the name space
 containing built-in names.
 
 Usually, the local scope references the local names of the (textually)
-current function.  Outside of functions, the the local scope references
+current function.  Outside of functions, the local scope references
 the same name space as the global scope: the module's name space.
 Class definitions place yet another name space in the local scope.
 
@@ -2165,7 +2165,7 @@ It is important to realize that scopes are determined textually: the
 global scope of a function defined in a module is that module's name
 space, no matter from where or by what alias the function is called.
 On the other hand, the actual search for names is done dynamically, at
-run time --- however, the the language definition is evolving towards
+run time --- however, the language definition is evolving towards
 static name resolution, at ``compile'' time, so don't rely on dynamic
 name resolution!  (In fact, local variables are already determined
 statically.)