summaryrefslogtreecommitdiffstats
path: root/Doc/libbinascii.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-27 21:29:51 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-27 21:29:51 (GMT)
commite9a0732cd1ccda75ad6092f3853e32aa99880003 (patch)
treea015ad10babe36982ff6f446d19c0d2d5d81c4ac /Doc/libbinascii.tex
parente76b7a8fcd769c4204a7f0e0438dce482fa32015 (diff)
downloadcpython-e9a0732cd1ccda75ad6092f3853e32aa99880003.zip
cpython-e9a0732cd1ccda75ad6092f3853e32aa99880003.tar.gz
cpython-e9a0732cd1ccda75ad6092f3853e32aa99880003.tar.bz2
Note that passing a filename to uu.{en,de}code() is deprecated.
Diffstat (limited to 'Doc/libbinascii.tex')
-rw-r--r--Doc/libbinascii.tex17
1 files changed, 8 insertions, 9 deletions
diff --git a/Doc/libbinascii.tex b/Doc/libbinascii.tex
index 6938eeb..4e3d674 100644
--- a/Doc/libbinascii.tex
+++ b/Doc/libbinascii.tex
@@ -18,7 +18,7 @@ method).
\end{funcdesc}
\begin{funcdesc}{hexbin}{input\optional{\, output}}
-Decode a binhex file \var{input}. \var{Input} may be a filename or a
+Decode a binhex file \var{input}. \var{input} may be a filename or a
file-like object supporting \var{read} and \var{close} methods.
The resulting file is written to a file named \var{output}, unless the
argument is empty in which case the output filename is read from the
@@ -40,14 +40,13 @@ As of this writing, \var{hexbin} appears to not work in all cases.
This module encodes and decodes files in uuencode format, allowing
arbitrary binary data to be transferred over ascii-only connections.
-Whereever a file argument is expected, the methods accept either a
-pathname (\code{'-'} for stdin/stdout) or a file-like object.
-
-Normally you would pass filenames, but there is one case where you
-have to open the file yourself: if you are on a non-unix platform and
-your binary file is actually a textfile that you want encoded
-unix-compatible you will have to open the file yourself as a textfile,
-so newline conversion is performed.
+Wherever a file argument is expected, the methods accept a file-like
+object. For backwards compatibility, a string containing a pathname
+is also accepted, and the corresponding file will be opened for
+reading and writing; the pathname \code{'-'} is understood to mean the
+standard input or output. However, this interface is deprecated; it's
+better for the caller to open the file itself, and be sure that, when
+required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen.