[Python-checkins] CVS: python/dist/src/Doc/lib libaifc.tex,1.14,1.15 libarray.tex,1.28,1.29 libbisect.tex,1.9,1.10 libcgi.tex,1.29,1.30 libcurses.tex,1.32,1.33 libftplib.tex,1.31,1.32 libfuncs.tex,1.78,1.79 libgettext.tex,1.7,1.8 libimp.tex,1.28,1.29 libmd5.tex,1.19,1.20 libmimify.tex,1.10,1.11 libnis.tex,1.5,1.6
Fred L. Drake
fdrake@users.sourceforge.net
Fri, 06 Jul 2001 12:28:50 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv8338
Modified Files:
libaifc.tex libarray.tex libbisect.tex libcgi.tex
libcurses.tex libftplib.tex libfuncs.tex libgettext.tex
libimp.tex libmd5.tex libmimify.tex libnis.tex
Log Message:
Fix up a few style nits -- avoid "e.g." and "i.e." -- these make
translation more difficult, as well as reading the English more
difficult for non-native speakers.
Index: libaifc.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libaifc.tex,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** libaifc.tex 1999/12/21 18:31:29 1.14
--- libaifc.tex 2001/07/06 19:28:48 1.15
***************
*** 30,34 ****
bits), uses two channels (stereo) and has a frame rate of 44,100
frames/second. This gives a frame size of 4 bytes (2*2), and a
! second's worth occupies 2*2*44100 bytes, i.e.\ 176,400 bytes.
Module \module{aifc} defines the following function:
--- 30,34 ----
bits), uses two channels (stereo) and has a frame rate of 44,100
frames/second. This gives a frame size of 4 bytes (2*2), and a
! second's worth occupies 2*2*44100 bytes (176,400 bytes).
Module \module{aifc} defines the following function:
Index: libarray.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** libarray.tex 2000/12/11 20:57:13 1.28
--- libarray.tex 2001/07/06 19:28:48 1.29
***************
*** 109,113 ****
\begin{methoddesc}[array]{fromstring}{s}
Appends items from the string, interpreting the string as an
! array of machine values (i.e. as if it had been read from a
file using the \method{fromfile()} method).
\end{methoddesc}
--- 109,113 ----
\begin{methoddesc}[array]{fromstring}{s}
Appends items from the string, interpreting the string as an
! array of machine values (as if it had been read from a
file using the \method{fromfile()} method).
\end{methoddesc}
Index: libbisect.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libbisect.tex,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** libbisect.tex 2001/01/04 14:18:55 1.9
--- libbisect.tex 2001/07/06 19:28:48 1.10
***************
*** 16,20 ****
\module{bisect} because it uses a basic bisection algorithm to do its
work. The source code may be most useful as a working example of the
! algorithm (i.e., the boundary conditions are already right!).
The following functions are provided:
--- 16,20 ----
\module{bisect} because it uses a basic bisection algorithm to do its
work. The source code may be most useful as a working example of the
! algorithm (the boundary conditions are already right!).
The following functions are provided:
Index: libcgi.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgi.tex,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** libcgi.tex 2001/06/29 14:59:01 1.29
--- libcgi.tex 2001/07/06 19:28:48 1.30
***************
*** 113,117 ****
\samp{form.getvalue(\var{key})} would return a list of strings.
If you expect this possibility
! (i.e., when your HTML form contains multiple fields with the same
name), use the \function{type()} function to determine whether you
have a single instance or a list of instances. For example, here's
--- 113,117 ----
\samp{form.getvalue(\var{key})} would return a list of strings.
If you expect this possibility
! (when your HTML form contains multiple fields with the same
name), use the \function{type()} function to determine whether you
have a single instance or a list of instances. For example, here's
***************
*** 284,288 ****
contain such characters in HTML. If the optional flag \var{quote} is
true, the double quote character (\character{"}) is also translated;
! this helps for inclusion in an HTML attribute value, e.g. in \code{<A
HREF="...">}.
\end{funcdesc}
--- 284,288 ----
contain such characters in HTML. If the optional flag \var{quote} is
true, the double quote character (\character{"}) is also translated;
! this helps for inclusion in an HTML attribute value, as in \code{<A
HREF="...">}.
\end{funcdesc}
***************
*** 291,302 ****
\subsection{Caring about security}
! There's one important rule: if you invoke an external program (e.g.
! via the \function{os.system()} or \function{os.popen()} functions),
! make very sure you don't pass arbitrary strings received from the
! client to the shell. This is a well-known security hole whereby
! clever hackers anywhere on the web can exploit a gullible CGI script
! to invoke arbitrary shell commands. Even parts of the URL or field
! names cannot be trusted, since the request doesn't have to come from
! your form!
To be on the safe side, if you must pass a string gotten from a form
--- 291,302 ----
\subsection{Caring about security}
! There's one important rule: if you invoke an external program (via the
! \function{os.system()} or \function{os.popen()} functions. or others
! with similar functionality), make very sure you don't pass arbitrary
! strings received from the client to the shell. This is a well-known
! security hole whereby clever hackers anywhere on the web can exploit a
! gullible CGI script to invoke arbitrary shell commands. Even parts of
! the URL or field names cannot be trusted, since the request doesn't
! have to come from your form!
To be on the safe side, if you must pass a string gotten from a form
***************
*** 338,342 ****
If you need to load modules from a directory which is not on Python's
default module search path, you can change the path in your script,
! before importing other modules, e.g.:
\begin{verbatim}
--- 338,342 ----
If you need to load modules from a directory which is not on Python's
default module search path, you can change the path in your script,
! before importing other modules. For example:
\begin{verbatim}
***************
*** 384,388 ****
If this gives an error of type 404, the server cannot find the script
-- perhaps you need to install it in a different directory. If it
! gives another error (e.g. 500), there's an installation problem that
you should fix before trying to go any further. If you get a nicely
formatted listing of the environment and form content (in this
--- 384,388 ----
If this gives an error of type 404, the server cannot find the script
-- perhaps you need to install it in a different directory. If it
! gives another error, there's an installation problem that
you should fix before trying to go any further. If you get a nicely
formatted listing of the environment and form content (in this
***************
*** 403,412 ****
the \file{cgi.py} file itself.
! When an ordinary Python script raises an unhandled exception
! (e.g. because of a typo in a module name, a file that can't be opened,
! etc.), the Python interpreter prints a nice traceback and exits.
! While the Python interpreter will still do this when your CGI script
! raises an exception, most likely the traceback will end up in one of
! the HTTP server's log file, or be discarded altogether.
Fortunately, once you have managed to get your script to execute
--- 403,412 ----
the \file{cgi.py} file itself.
! When an ordinary Python script raises an unhandled exception (for
! whatever reason: of a typo in a module name, a file that can't be
! opened, etc.), the Python interpreter prints a nice traceback and
! exits. While the Python interpreter will still do this when your CGI
! script raises an exception, most likely the traceback will end up in
! one of the HTTP server's log file, or be discarded altogether.
Fortunately, once you have managed to get your script to execute
Index: libcurses.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** libcurses.tex 2001/04/21 05:56:06 1.32
--- libcurses.tex 2001/07/06 19:28:48 1.33
***************
*** 332,336 ****
screen. Pads can be used when a large window is needed, and only a
part of the window will be on the screen at one time. Automatic
! refreshes of pads (e.g., from scrolling or echoing of input) do not
occur. The \method{refresh()} and \method{noutrefresh()} methods of a
pad require 6 arguments to specify the part of the pad to be
--- 332,336 ----
screen. Pads can be used when a large window is needed, and only a
part of the window will be on the screen at one time. Automatic
! refreshes of pads (such as from scrolling or echoing of input) do not
occur. The \method{refresh()} and \method{noutrefresh()} methods of a
pad require 6 arguments to specify the part of the pad to be
***************
*** 543,547 ****
\begin{methoddesc}{addch}{\optional{y, x,} ch\optional{, attr}}
! \strong{Note:} A \emph{character} means a C character (i.e., an
\ASCII{} code), rather then a Python character (a string of length 1).
(This note is true whenever the documentation mentions a character.)
--- 543,547 ----
\begin{methoddesc}{addch}{\optional{y, x,} ch\optional{, attr}}
! \strong{Note:} A \emph{character} means a C character (an
\ASCII{} code), rather then a Python character (a string of length 1).
(This note is true whenever the documentation mentions a character.)
Index: libftplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** libftplib.tex 2001/02/15 13:53:40 1.31
--- libftplib.tex 2001/07/06 19:28:48 1.32
***************
*** 149,153 ****
callback\optional{, maxblocksize\optional{, rest}}}
Retrieve a file in binary transfer mode. \var{command} should be an
! appropriate \samp{RETR} command, i.e.\ \code{'RETR \var{filename}'}.
The \var{callback} function is called for each block of data received,
with a single string argument giving the data block.
--- 149,153 ----
callback\optional{, maxblocksize\optional{, rest}}}
Retrieve a file in binary transfer mode. \var{command} should be an
! appropriate \samp{RETR} command: \code{'RETR \var{filename}'}.
The \var{callback} function is called for each block of data received,
with a single string argument giving the data block.
***************
*** 176,180 ****
\begin{methoddesc}{storbinary}{command, file\optional{, blocksize}}
Store a file in binary transfer mode. \var{command} should be an
! appropriate \samp{STOR} command, i.e.\ \code{"STOR \var{filename}"}.
\var{file} is an open file object which is read until \EOF{} using its
\method{read()} method in blocks of size \var{blocksize} to provide the
--- 176,180 ----
\begin{methoddesc}{storbinary}{command, file\optional{, blocksize}}
Store a file in binary transfer mode. \var{command} should be an
! appropriate \samp{STOR} command: \code{"STOR \var{filename}"}.
\var{file} is an open file object which is read until \EOF{} using its
\method{read()} method in blocks of size \var{blocksize} to provide the
***************
*** 282,288 ****
\begin{methoddesc}{close}{}
Close the connection unilaterally. This should not be applied to an
! already closed connection (e.g.\ after a successful call to
\method{quit()}. After this call the \class{FTP} instance should not
! be used any more (i.e., after a call to \method{close()} or
\method{quit()} you cannot reopen the connection by issuing another
\method{login()} method).
--- 282,288 ----
\begin{methoddesc}{close}{}
Close the connection unilaterally. This should not be applied to an
! already closed connection (such as after a successful call to
\method{quit()}. After this call the \class{FTP} instance should not
! be used any more (after a call to \method{close()} or
\method{quit()} you cannot reopen the connection by issuing another
\method{login()} method).
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -r1.78 -r1.79
*** libfuncs.tex 2001/05/15 15:27:53 1.78
--- libfuncs.tex 2001/07/06 19:28:48 1.79
***************
*** 100,107 ****
\begin{funcdesc}{chr}{i}
Return a string of one character whose \ASCII{} code is the integer
! \var{i}, e.g., \code{chr(97)} returns the string \code{'a'}. This is the
! inverse of \function{ord()}. The argument must be in the range [0..255],
! inclusive; \exception{ValueError} will be raised if \var{i} is
! outside that range.
\end{funcdesc}
--- 100,107 ----
\begin{funcdesc}{chr}{i}
Return a string of one character whose \ASCII{} code is the integer
! \var{i}. For example, \code{chr(97)} returns the string \code{'a'}.
! This is the inverse of \function{ord()}. The argument must be in
! the range [0..255], inclusive; \exception{ValueError} will be raised
! if \var{i} is outside that range.
\end{funcdesc}
***************
*** 123,134 ****
executed by an \keyword{exec} statement or evaluated by a call to
\function{eval()}. The \var{filename} argument should
! give the file from which the code was read; pass e.g. \code{'<string>'}
! if it wasn't read from a file. The \var{kind} argument specifies
! what kind of code must be compiled; it can be \code{'exec'} if
! \var{string} consists of a sequence of statements, \code{'eval'}
! if it consists of a single expression, or \code{'single'} if
! it consists of a single interactive statement (in the latter case,
! expression statements that evaluate to something else than
! \code{None} will printed).
\end{funcdesc}
--- 123,134 ----
executed by an \keyword{exec} statement or evaluated by a call to
\function{eval()}. The \var{filename} argument should
! give the file from which the code was read; pass same recognizable value
! if it wasn't read from a file (\code{'<string>'} is commonly used).
! The \var{kind} argument specifies what kind of code must be
! compiled; it can be \code{'exec'} if \var{string} consists of a
! sequence of statements, \code{'eval'} if it consists of a single
! expression, or \code{'single'} if it consists of a single
! interactive statement (in the latter case, expression statements
! that evaluate to something else than \code{None} will printed).
\end{funcdesc}
***************
*** 157,163 ****
attribute for that object. This information is gleaned from the
object's \member{__dict__}, \member{__methods__} and \member{__members__}
! attributes, if defined. The list is not necessarily complete; e.g.,
! for classes, attributes defined in base classes are not included,
! and for class instances, methods are not included.
The resulting list is sorted alphabetically. For example:
--- 157,163 ----
attribute for that object. This information is gleaned from the
object's \member{__dict__}, \member{__methods__} and \member{__members__}
! attributes, if defined. The list is not necessarily complete. For
! example, for classes, attributes defined in base classes are not
! included, and for class instances, methods are not included.
The resulting list is sorted alphabetically. For example:
***************
*** 203,209 ****
This function can also be used to execute arbitrary code objects
! (e.g.\ created by \function{compile()}). In this case pass a code
! object instead of a string. The code object must have been compiled
! passing \code{'eval'} to the \var{kind} argument.
Hints: dynamic execution of statements is supported by the
--- 203,209 ----
This function can also be used to execute arbitrary code objects
! (such as those created by \function{compile()}). In this case pass
! a code object instead of a string. The code object must have been
! compiled passing \code{'eval'} as the \var{kind} argument.
Hints: dynamic execution of statements is supported by the
***************
*** 240,244 ****
is a string or a tuple, the result also has that type; otherwise it
is always a list. If \var{function} is \code{None}, the identity
! function is assumed, i.e.\ all elements of \var{list} that are false
(zero or empty) are removed.
\end{funcdesc}
--- 240,244 ----
is a string or a tuple, the result also has that type; otherwise it
is always a list. If \var{function} is \code{None}, the identity
! function is assumed, that is, all elements of \var{list} that are false
(zero or empty) are removed.
\end{funcdesc}
***************
*** 287,292 ****
are integers. They are used to quickly compare dictionary
keys during a dictionary lookup. Numeric values that compare equal
! have the same hash value (even if they are of different types, e.g.
! 1 and 1.0).
\end{funcdesc}
--- 287,292 ----
are integers. They are used to quickly compare dictionary
keys during a dictionary lookup. Numeric values that compare equal
! have the same hash value (even if they are of different types, as is
! the case for 1 and 1.0).
\end{funcdesc}
***************
*** 294,302 ****
Convert an integer number (of any size) to a hexadecimal string.
The result is a valid Python expression. Note: this always yields
! an unsigned literal, e.g. on a 32-bit machine, \code{hex(-1)} yields
! \code{'0xffffffff'}. When evaluated on a machine with the same
! word size, this literal is evaluated as -1; at a different word
! size, it may turn up as a large positive number or raise an
! \exception{OverflowError} exception.
\end{funcdesc}
--- 294,302 ----
Convert an integer number (of any size) to a hexadecimal string.
The result is a valid Python expression. Note: this always yields
! an unsigned literal. For example, on a 32-bit machine,
! \code{hex(-1)} yields \code{'0xffffffff'}. When evaluated on a
! machine with the same word size, this literal is evaluated as -1; at
! a different word size, it may turn up as a large positive number or
! raise an \exception{OverflowError} exception.
\end{funcdesc}
***************
*** 353,357 ****
the names used in Python programs are automatically interned, and
the dictionaries used to hold module, class or instance attributes
! have interned keys. Interned strings are immortal (i.e. never get
garbage collected).
\end{funcdesc}
--- 353,357 ----
the names used in Python programs are automatically interned, and
the dictionaries used to hold module, class or instance attributes
! have interned keys. Interned strings are immortal (never get
garbage collected).
\end{funcdesc}
***************
*** 411,444 ****
\begin{funcdesc}{map}{function, list, ...}
! Apply \var{function} to every item of \var{list} and return a list
! of the results. If additional \var{list} arguments are passed,
! \var{function} must take that many arguments and is applied to
! the items of all lists in parallel; if a list is shorter than another
! it is assumed to be extended with \code{None} items. If
! \var{function} is \code{None}, the identity function is assumed; if
! there are multiple list arguments, \function{map()} returns a list
! consisting of tuples containing the corresponding items from all lists
! (i.e. a kind of transpose operation). The \var{list} arguments may be
! any kind of sequence; the result is always a list.
\end{funcdesc}
\begin{funcdesc}{max}{s\optional{, args...}}
! With a single argument \var{s}, return the largest item of a
! non-empty sequence (e.g., a string, tuple or list). With more than
! one argument, return the largest of the arguments.
\end{funcdesc}
\begin{funcdesc}{min}{s\optional{, args...}}
! With a single argument \var{s}, return the smallest item of a
! non-empty sequence (e.g., a string, tuple or list). With more than
! one argument, return the smallest of the arguments.
\end{funcdesc}
\begin{funcdesc}{oct}{x}
Convert an integer number (of any size) to an octal string. The
! result is a valid Python expression. Note: this always yields
! an unsigned literal, e.g. on a 32-bit machine, \code{oct(-1)} yields
! \code{'037777777777'}. When evaluated on a machine with the same
! word size, this literal is evaluated as -1; at a different word
size, it may turn up as a large positive number or raise an
\exception{OverflowError} exception.
--- 411,444 ----
\begin{funcdesc}{map}{function, list, ...}
! Apply \var{function} to every item of \var{list} and return a list
! of the results. If additional \var{list} arguments are passed,
! \var{function} must take that many arguments and is applied to the
! items of all lists in parallel; if a list is shorter than another it
! is assumed to be extended with \code{None} items. If \var{function}
! is \code{None}, the identity function is assumed; if there are
! multiple list arguments, \function{map()} returns a list consisting
! of tuples containing the corresponding items from all lists (a kind
! of transpose operation). The \var{list} arguments may be any kind
! of sequence; the result is always a list.
\end{funcdesc}
\begin{funcdesc}{max}{s\optional{, args...}}
! With a single argument \var{s}, return the largest item of a
! non-empty sequence (such as a string, tuple or list). With more
! than one argument, return the largest of the arguments.
\end{funcdesc}
\begin{funcdesc}{min}{s\optional{, args...}}
! With a single argument \var{s}, return the smallest item of a
! non-empty sequence (such as a string, tuple or list). With more
! than one argument, return the smallest of the arguments.
\end{funcdesc}
\begin{funcdesc}{oct}{x}
Convert an integer number (of any size) to an octal string. The
! result is a valid Python expression. Note: this always yields an
! unsigned literal. For example, on a 32-bit machine, \code{oct(-1)}
! yields \code{'037777777777'}. When evaluated on a machine with the
! same word size, this literal is evaluated as -1; at a different word
size, it may turn up as a large positive number or raise an
\exception{OverflowError} exception.
***************
*** 500,505 ****
arithmetic operators apply. The effective operand type is also the
type of the result; if the result is not expressible in this type, the
! function raises an exception; e.g., \code{pow(2, -1)} or \code{pow(2,
! 35000)} is not allowed.
\end{funcdesc}
--- 500,505 ----
arithmetic operators apply. The effective operand type is also the
type of the result; if the result is not expressible in this type, the
! function raises an exception; for example, \code{pow(2, -1)} or
! \code{pow(2, 35000)} is not allowed.
\end{funcdesc}
***************
*** 571,575 ****
file using an external editor and want to try out the new version
without leaving the Python interpreter. The return value is the
! module object (i.e.\ the same as the \var{module} argument).
There are a number of caveats:
--- 571,575 ----
file using an external editor and want to try out the new version
without leaving the Python interpreter. The return value is the
! module object (the same as the \var{module} argument).
There are a number of caveats:
***************
*** 624,628 ****
The result is a floating point number. Values are rounded to the
closest multiple of 10 to the power minus \var{n}; if two multiples
! are equally close, rounding is done away from 0 (so e.g.
\code{round(0.5)} is \code{1.0} and \code{round(-0.5)} is \code{-1.0}).
\end{funcdesc}
--- 624,628 ----
The result is a floating point number. Values are rounded to the
closest multiple of 10 to the power minus \var{n}; if two multiples
! are equally close, rounding is done away from 0 (so. for example,
\code{round(0.5)} is \code{1.0} and \code{round(-0.5)} is \code{-1.0}).
\end{funcdesc}
***************
*** 646,650 ****
Python\index{Numerical Python} and other third party extensions.
Slice objects are also generated when extended indexing syntax is
! used, e.g. for \samp{a[start:stop:step]} or \samp{a[start:stop, i]}.
\end{funcdesc}
--- 646,650 ----
Python\index{Numerical Python} and other third party extensions.
Slice objects are also generated when extended indexing syntax is
! used. For example: \samp{a[start:stop:step]} or \samp{a[start:stop, i]}.
\end{funcdesc}
***************
*** 681,685 ****
\begin{funcdesc}{unichr}{i}
Return the Unicode string of one character whose Unicode code is the
! integer \var{i}, e.g., \code{unichr(97)} returns the string
\code{u'a'}. This is the inverse of \function{ord()} for Unicode
strings. The argument must be in the range [0..65535], inclusive.
--- 681,685 ----
\begin{funcdesc}{unichr}{i}
Return the Unicode string of one character whose Unicode code is the
! integer \var{i}. For example, \code{unichr(97)} returns the string
\code{u'a'}. This is the inverse of \function{ord()} for Unicode
strings. The argument must be in the range [0..65535], inclusive.
***************
*** 713,717 ****
In the current implementation, local variable bindings cannot
normally be affected this way, but variables retrieved from
! other scopes (e.g. modules) can be. This may change.}
\end{funcdesc}
--- 713,717 ----
In the current implementation, local variable bindings cannot
normally be affected this way, but variables retrieved from
! other scopes (such as modules) can be. This may change.}
\end{funcdesc}
***************
*** 724,729 ****
\function{xrange()} still has to create the values when asked for
them) except when a very large range is used on a memory-starved
! machine (e.g. MS-DOS) or when all of the range's elements are never
! used (e.g. when the loop is usually terminated with \keyword{break}).
\end{funcdesc}
--- 724,729 ----
\function{xrange()} still has to create the values when asked for
them) except when a very large range is used on a memory-starved
! machine or when all of the range's elements are never used (such as
! when the loop is usually terminated with \keyword{break}).
\end{funcdesc}
Index: libgettext.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgettext.tex,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** libgettext.tex 2001/01/31 21:21:45 1.7
--- libgettext.tex 2001/07/06 19:28:48 1.8
***************
*** 42,51 ****
If \var{localedir} is omitted or \code{None}, then the current binding
for \var{domain} is returned.\footnote{
! The default locale directory is system dependent; e.g.\ on
! RedHat Linux it is \file{/usr/share/locale}, but on Solaris it
! is \file{/usr/lib/locale}. The \module{gettext} module does
! not try to support these system dependent defaults; instead
! its default is \file{\code{sys.prefix}/share/locale}. For
! this reason, it is always best to call
\function{bindtextdomain()} with an explicit absolute path at
the start of your application.}
--- 42,51 ----
If \var{localedir} is omitted or \code{None}, then the current binding
for \var{domain} is returned.\footnote{
! The default locale directory is system dependent; for example,
! on RedHat Linux it is \file{/usr/share/locale}, but on Solaris
! it is \file{/usr/lib/locale}. The \module{gettext} module
! does not try to support these system dependent defaults;
! instead its default is \file{\code{sys.prefix}/share/locale}.
! For this reason, it is always best to call
\function{bindtextdomain()} with an explicit absolute path at
the start of your application.}
***************
*** 142,147 ****
As seen below, you usually mark the strings in your application that are
! candidates for translation, by wrapping them in a call to the function
! \function{_()}, e.g.
\begin{verbatim}
--- 142,147 ----
As seen below, you usually mark the strings in your application that are
! candidates for translation, by wrapping them in a call to the
! \function{_()} function, like this:
\begin{verbatim}
***************
*** 288,293 ****
In order to prepare your code for I18N, you need to look at all the
strings in your files. Any string that needs to be translated
! should be marked by wrapping it in \code{_('...')} -- i.e. a call to
! the function \function{_()}. For example:
\begin{verbatim}
--- 288,293 ----
In order to prepare your code for I18N, you need to look at all the
strings in your files. Any string that needs to be translated
! should be marked by wrapping it in \code{_('...')} --- that is, a call
! to the function \function{_()}. For example:
\begin{verbatim}
***************
*** 318,322 ****
intricacies of Python source code, but knows nothing about C or C++
source code. You don't need GNU \code{gettext} unless you're also
! going to be translating C code (e.g. C extension modules).
\program{pygettext} generates textual Uniforum-style human readable
--- 318,322 ----
intricacies of Python source code, but knows nothing about C or C++
source code. You don't need GNU \code{gettext} unless you're also
! going to be translating C code (such as C extension modules).
\program{pygettext} generates textual Uniforum-style human readable
Index: libimp.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libimp.tex,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** libimp.tex 2001/01/17 05:12:13 1.28
--- libimp.tex 2001/07/06 19:28:48 1.29
***************
*** 58,62 ****
This function does not handle hierarchical module names (names
! containing dots). In order to find \var{P}.\var{M}, i.e., submodule
\var{M} of package \var{P}, use \function{find_module()} and
\function{load_module()} to find and load package \var{P}, and then use
--- 58,62 ----
This function does not handle hierarchical module names (names
! containing dots). In order to find \var{P}.\var{M}, that is, submodule
\var{M} of package \var{P}, use \function{find_module()} and
\function{load_module()} to find and load package \var{P}, and then use
***************
*** 212,216 ****
The following function emulates what was the standard import statement
! up to Python 1.4 (i.e., no hierarchical module names). (This
\emph{implementation} wouldn't work in that version, since
\function{find_module()} has been extended and
--- 212,216 ----
The following function emulates what was the standard import statement
! up to Python 1.4 (no hierarchical module names). (This
\emph{implementation} wouldn't work in that version, since
\function{find_module()} has been extended and
Index: libmd5.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmd5.tex,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** libmd5.tex 2001/01/24 17:19:06 1.19
--- libmd5.tex 2001/07/06 19:28:48 1.20
***************
*** 51,55 ****
Update the md5 object with the string \var{arg}. Repeated calls are
equivalent to a single call with the concatenation of all the
! arguments, i.e.\ \code{m.update(a); m.update(b)} is equivalent to
\code{m.update(a+b)}.
\end{methoddesc}
--- 51,55 ----
Update the md5 object with the string \var{arg}. Repeated calls are
equivalent to a single call with the concatenation of all the
! arguments: \code{m.update(a); m.update(b)} is equivalent to
\code{m.update(a+b)}.
\end{methoddesc}
Index: libmimify.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmimify.tex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** libmimify.tex 2000/04/04 20:42:38 1.10
--- libmimify.tex 2001/07/06 19:28:48 1.11
***************
*** 57,61 ****
\begin{datadesc}{MAXLEN}
By default, a part will be encoded as quoted-printable when it
! contains any non-\ASCII{} characters (i.e., characters with the 8th bit
set), or if there are any lines longer than \constant{MAXLEN} characters
(default value 200).
--- 57,61 ----
\begin{datadesc}{MAXLEN}
By default, a part will be encoded as quoted-printable when it
! contains any non-\ASCII{} characters (characters with the 8th bit
set), or if there are any lines longer than \constant{MAXLEN} characters
(default value 200).
Index: libnis.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libnis.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** libnis.tex 2000/12/01 15:25:23 1.5
--- libnis.tex 2001/07/06 19:28:48 1.6
***************
*** 6,10 ****
\moduleauthor{Fred Gansevles}{Fred.Gansevles@cs.utwente.nl}
\sectionauthor{Moshe Zadka}{moshez@zadka.site.co.il}
! \modulesynopsis{Interface to Sun's NIS (a.k.a. Yellow Pages) library.}
The \module{nis} module gives a thin wrapper around the NIS library, useful
--- 6,10 ----
\moduleauthor{Fred Gansevles}{Fred.Gansevles@cs.utwente.nl}
\sectionauthor{Moshe Zadka}{moshez@zadka.site.co.il}
! \modulesynopsis{Interface to Sun's NIS (Yellow Pages) library.}
The \module{nis} module gives a thin wrapper around the NIS library, useful
***************
*** 12,16 ****
Because NIS exists only on \UNIX{} systems, this module is
! only available for \UNIX{}.
The \module{nis} module defines the following functions:
--- 12,16 ----
Because NIS exists only on \UNIX{} systems, this module is
! only available for \UNIX.
The \module{nis} module defines the following functions:
***************
*** 20,27 ****
error (\exception{nis.error}) if there is none.
Both should be strings, \var{key} is 8-bit clean.
! Return value is an arbitrary array of bytes (i.e., may contain \code{NULL}
and other joys).
! Note that \var{mapname} is first checked if it is an alias to another name.
\end{funcdesc}
--- 20,28 ----
error (\exception{nis.error}) if there is none.
Both should be strings, \var{key} is 8-bit clean.
! Return value is an arbitrary array of bytes (may contain \code{NULL}
and other joys).
! Note that \var{mapname} is first checked if it is an alias to another
! name.
\end{funcdesc}
***************
*** 32,36 ****
arrays of bytes.
! Note that \var{mapname} is first checked if it is an alias to another name.
\end{funcdesc}
--- 33,38 ----
arrays of bytes.
! Note that \var{mapname} is first checked if it is an alias to another
! name.
\end{funcdesc}