Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
7e183e90
Kaydet (Commit)
7e183e90
authored
Agu 30, 1995
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Documented new argument order.
üst
8b745126
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
62 deletions
+46
-62
libbinascii.tex
Doc/lib/libbinascii.tex
+23
-31
libbinascii.tex
Doc/libbinascii.tex
+23
-31
No files found.
Doc/lib/libbinascii.tex
Dosyayı görüntüle @
7e183e90
...
...
@@ -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
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
}}
\stmodindex
{
uu
}
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.
The
\code
{
uu
}
module defines the following functions:
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
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.
\begin{funcdesc}
{
encode
}{
filename
\,
mode
\,
in
_
file
\,
out
_
file
}
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. Both are
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}
This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen.
\begin{funcdesc}
{
decode
}{
filename
\,
mode
\,
in
_
file
}
Note that this function uses a non-standard form of variable
arguments, see below for other variants of argument lists.
The
\code
{
uu
}
module defines the following functions:
This call decodes uuencoded file
\var
{
in
_
file
}
(an object supporting a
\var
{
readline
}
method), placing the result on a file with name
\var
{
filename
}
and mode
\var
{
mode
}
.
\end{funcdesc}
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
\begin{funcdesc}
{
decode
}{
in
_
file
\,
out
_
file
}
An alternative form of
\var
{
decode
}
which writes the resulting data to
\var
{
out
_
file
}
(an object supporting a
\var
{
write
}
method).
\begin{funcdesc}
{
encode
}{
in
_
file
\,
out
_
file
\optional
{
\,
name
\,
mode
}}
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. The uuencoded
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}
\begin{funcdesc}
{
decode
}{
in
_
file
}
An alternative form of
\var
{
decode
}
which stores the result in the
file specified in the uuencoded file.
\begin{funcdesc}
{
decode
}{
in
_
file
\optional
{
\,
out
_
file
\,
mode
}}
This call decodes uuencoded file
\var
{
in
_
file
}
placing the result on
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}
\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
\bimodindex
{
binascii
}
...
...
Doc/libbinascii.tex
Dosyayı görüntüle @
7e183e90
...
...
@@ -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
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
}}
\stmodindex
{
uu
}
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.
The
\code
{
uu
}
module defines the following functions:
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
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.
\begin{funcdesc}
{
encode
}{
filename
\,
mode
\,
in
_
file
\,
out
_
file
}
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. Both are
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}
This code was contributed by Lance Ellinghouse, and modified by Jack
Jansen.
\begin{funcdesc}
{
decode
}{
filename
\,
mode
\,
in
_
file
}
Note that this function uses a non-standard form of variable
arguments, see below for other variants of argument lists.
The
\code
{
uu
}
module defines the following functions:
This call decodes uuencoded file
\var
{
in
_
file
}
(an object supporting a
\var
{
readline
}
method), placing the result on a file with name
\var
{
filename
}
and mode
\var
{
mode
}
.
\end{funcdesc}
\renewcommand
{
\indexsubitem
}{
(in module uu)
}
\begin{funcdesc}
{
decode
}{
in
_
file
\,
out
_
file
}
An alternative form of
\var
{
decode
}
which writes the resulting data to
\var
{
out
_
file
}
(an object supporting a
\var
{
write
}
method).
\begin{funcdesc}
{
encode
}{
in
_
file
\,
out
_
file
\optional
{
\,
name
\,
mode
}}
Uuencode file
\var
{
in
_
file
}
into file
\var
{
out
_
file
}
. The uuencoded
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}
\begin{funcdesc}
{
decode
}{
in
_
file
}
An alternative form of
\var
{
decode
}
which stores the result in the
file specified in the uuencoded file.
\begin{funcdesc}
{
decode
}{
in
_
file
\optional
{
\,
out
_
file
\,
mode
}}
This call decodes uuencoded file
\var
{
in
_
file
}
placing the result on
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}
\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
\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