Kaydet (Commit) e9a0732c authored tarafından Guido van Rossum's avatar Guido van Rossum

Note that passing a filename to uu.{en,de}code() is deprecated.

üst e76b7a8f
...@@ -18,7 +18,7 @@ method). ...@@ -18,7 +18,7 @@ method).
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{hexbin}{input\optional{\, output}} \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. file-like object supporting \var{read} and \var{close} methods.
The resulting file is written to a file named \var{output}, unless the 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 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. ...@@ -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 This module encodes and decodes files in uuencode format, allowing
arbitrary binary data to be transferred over ascii-only connections. arbitrary binary data to be transferred over ascii-only connections.
Whereever a file argument is expected, the methods accept either a Wherever a file argument is expected, the methods accept a file-like
pathname (\code{'-'} for stdin/stdout) or a file-like object. object. For backwards compatibility, a string containing a pathname
is also accepted, and the corresponding file will be opened for
Normally you would pass filenames, but there is one case where you reading and writing; the pathname \code{'-'} is understood to mean the
have to open the file yourself: if you are on a non-unix platform and standard input or output. However, this interface is deprecated; it's
your binary file is actually a textfile that you want encoded better for the caller to open the file itself, and be sure that, when
unix-compatible you will have to open the file yourself as a textfile, required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
so newline conversion is performed.
This code was contributed by Lance Ellinghouse, and modified by Jack This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen. Jansen.
......
...@@ -18,7 +18,7 @@ method). ...@@ -18,7 +18,7 @@ method).
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{hexbin}{input\optional{\, output}} \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. file-like object supporting \var{read} and \var{close} methods.
The resulting file is written to a file named \var{output}, unless the 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 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. ...@@ -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 This module encodes and decodes files in uuencode format, allowing
arbitrary binary data to be transferred over ascii-only connections. arbitrary binary data to be transferred over ascii-only connections.
Whereever a file argument is expected, the methods accept either a Wherever a file argument is expected, the methods accept a file-like
pathname (\code{'-'} for stdin/stdout) or a file-like object. object. For backwards compatibility, a string containing a pathname
is also accepted, and the corresponding file will be opened for
Normally you would pass filenames, but there is one case where you reading and writing; the pathname \code{'-'} is understood to mean the
have to open the file yourself: if you are on a non-unix platform and standard input or output. However, this interface is deprecated; it's
your binary file is actually a textfile that you want encoded better for the caller to open the file itself, and be sure that, when
unix-compatible you will have to open the file yourself as a textfile, required, the mode is \code{'rb'} or \code{'wb'} on Windows or DOS.
so newline conversion is performed.
This code was contributed by Lance Ellinghouse, and modified by Jack This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen. Jansen.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment