Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b3a518f6
Commit
b3a518f6
authored
Aug 30, 1995
by
Jack Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documented new argument order.
parent
d404efdb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
62 deletions
+46
-62
Doc/lib/libbinascii.tex
Doc/lib/libbinascii.tex
+23
-31
Doc/libbinascii.tex
Doc/libbinascii.tex
+23
-31
No files found.
Doc/lib/libbinascii.tex
View file @
b3a518f6
...
@@ -33,52 +33,44 @@ If you code or decode textfiles on non-Macintosh platforms they will
...
@@ -33,52 +33,44 @@ If you code or decode textfiles on non-Macintosh platforms they will
still use the macintosh newline convention (carriage-return as end of
still use the macintosh newline convention (carriage-return as end of
line).
line).
As of this writing,
hexbin
appears to not work in all cases.
As of this writing,
\var
{
hexbin
}
appears to not work in all cases.
\section
{
Standard module
\sectcode
{
uu
}}
\section
{
Standard module
\sectcode
{
uu
}}
\stmodindex
{
uu
}
\stmodindex
{
uu
}
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
pathname (
\code
{
'-'
}
for stdin/stdout) or a file-like object.
The
\code
{
uu
}
module defines the following functions:
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
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
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.
\begin{funcdesc}
{
encode
}{
filename
\,
mode
\,
in
_
file
\,
out
_
file
}
This code was contributed by Lance Ellinghouse, and modified by Jack
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. Both are
Jansen.
file-like objects supporting a
\var
{
read
}
and
\var
{
write
}
method
respectively. The uuencoded file will have the header specifying
\var
{
filename
}
and
\var
{
mode
}
as the defaults for the results of
decoding the file.
\end{funcdesc}
\begin{funcdesc}
{
decode
}{
filename
\,
mode
\,
in
_
file
}
The
\code
{
uu
}
module defines the following functions:
Note that this function uses a non-standard form of variable
arguments, see below for other variants of argument lists.
This call decodes uuencoded file
\var
{
in
_
file
}
(an object supporting a
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
\var
{
readline
}
method), placing the result on a file with name
\var
{
filename
}
and mode
\var
{
mode
}
.
\end{funcdesc}
\begin{funcdesc}
{
decode
}{
in
_
file
\,
out
_
file
}
\begin{funcdesc}
{
encode
}{
in
_
file
\,
out
_
file
\optional
{
\,
name
\,
mode
}}
An alternative form of
\var
{
decode
}
which writes the resulting data to
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. The uuencoded
\var
{
out
_
file
}
(an object supporting a
\var
{
write
}
method).
file will have the header specifying
\var
{
name
}
and
\var
{
mode
}
as the
defaults for the results of decoding the file. The default defaults
are taken from
\var
{
in
_
file
}
, or
\code
{
'-'
}
and
\code
{
0666
}
respectively.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
decode
}{
in
_
file
}
\begin{funcdesc}
{
decode
}{
in
_
file
\optional
{
\,
out
_
file
\,
mode
}}
An alternative form of
\var
{
decode
}
which stores the result in the
This call decodes uuencoded file
\var
{
in
_
file
}
placing the result on
file specified in the uuencoded file.
file
\var
{
out
_
file
}
. If
\var
{
out
_
file
}
is a pathname the
\var
{
mode
}
is
also set. Defaults for
\var
{
out
_
file
}
and
\var
{
mode
}
are taken from
the uuencode header.
\end{funcdesc}
\end{funcdesc}
\subsection
{
notes
}
This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen to use the
\var
{
binascii
}
module.
Encoding a file on a non-unix platforms may well result in a file
with the incorrect newline semantics or a file extractable only on the
original platform.
\section
{
Built-in Module
\sectcode
{
binascii
}}
% If implemented in C
\section
{
Built-in Module
\sectcode
{
binascii
}}
% If implemented in C
\bimodindex
{
binascii
}
\bimodindex
{
binascii
}
...
...
Doc/libbinascii.tex
View file @
b3a518f6
...
@@ -33,52 +33,44 @@ If you code or decode textfiles on non-Macintosh platforms they will
...
@@ -33,52 +33,44 @@ If you code or decode textfiles on non-Macintosh platforms they will
still use the macintosh newline convention (carriage-return as end of
still use the macintosh newline convention (carriage-return as end of
line).
line).
As of this writing,
hexbin
appears to not work in all cases.
As of this writing,
\var
{
hexbin
}
appears to not work in all cases.
\section
{
Standard module
\sectcode
{
uu
}}
\section
{
Standard module
\sectcode
{
uu
}}
\stmodindex
{
uu
}
\stmodindex
{
uu
}
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
pathname (
\code
{
'-'
}
for stdin/stdout) or a file-like object.
The
\code
{
uu
}
module defines the following functions:
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
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
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.
\begin{funcdesc}
{
encode
}{
filename
\,
mode
\,
in
_
file
\,
out
_
file
}
This code was contributed by Lance Ellinghouse, and modified by Jack
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. Both are
Jansen.
file-like objects supporting a
\var
{
read
}
and
\var
{
write
}
method
respectively. The uuencoded file will have the header specifying
\var
{
filename
}
and
\var
{
mode
}
as the defaults for the results of
decoding the file.
\end{funcdesc}
\begin{funcdesc}
{
decode
}{
filename
\,
mode
\,
in
_
file
}
The
\code
{
uu
}
module defines the following functions:
Note that this function uses a non-standard form of variable
arguments, see below for other variants of argument lists.
This call decodes uuencoded file
\var
{
in
_
file
}
(an object supporting a
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
\var
{
readline
}
method), placing the result on a file with name
\var
{
filename
}
and mode
\var
{
mode
}
.
\end{funcdesc}
\begin{funcdesc}
{
decode
}{
in
_
file
\,
out
_
file
}
\begin{funcdesc}
{
encode
}{
in
_
file
\,
out
_
file
\optional
{
\,
name
\,
mode
}}
An alternative form of
\var
{
decode
}
which writes the resulting data to
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. The uuencoded
\var
{
out
_
file
}
(an object supporting a
\var
{
write
}
method).
file will have the header specifying
\var
{
name
}
and
\var
{
mode
}
as the
defaults for the results of decoding the file. The default defaults
are taken from
\var
{
in
_
file
}
, or
\code
{
'-'
}
and
\code
{
0666
}
respectively.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
decode
}{
in
_
file
}
\begin{funcdesc}
{
decode
}{
in
_
file
\optional
{
\,
out
_
file
\,
mode
}}
An alternative form of
\var
{
decode
}
which stores the result in the
This call decodes uuencoded file
\var
{
in
_
file
}
placing the result on
file specified in the uuencoded file.
file
\var
{
out
_
file
}
. If
\var
{
out
_
file
}
is a pathname the
\var
{
mode
}
is
also set. Defaults for
\var
{
out
_
file
}
and
\var
{
mode
}
are taken from
the uuencode header.
\end{funcdesc}
\end{funcdesc}
\subsection
{
notes
}
This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen to use the
\var
{
binascii
}
module.
Encoding a file on a non-unix platforms may well result in a file
with the incorrect newline semantics or a file extractable only on the
original platform.
\section
{
Built-in Module
\sectcode
{
binascii
}}
% If implemented in C
\section
{
Built-in Module
\sectcode
{
binascii
}}
% If implemented in C
\bimodindex
{
binascii
}
\bimodindex
{
binascii
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment