.b2a_uu()
Anonymous contributor
Published May 21, 2024
Contribute to Docs
The .b2a_uu()
function converts binary data into a bytes object containing a string of ASCII characters in UUEncoded format.
Syntax
binascii.b2a_uu(data, *, backtick=false)
data
: A bytes object containing the binary data to be encoded.*
: This indicates that any arguments following it must be passed using keyword syntax.backtick
: When set to True, it replaces zero bytes in the UUEncoded data with a backtick character(`)
.
Example
import binascii# Create binary data to encodebinaryData = b"some text"# Encode the binary data to UUEncoded ASCII formatencodedData = binascii.b2a_uu(binaryData)print(encodedData)
This produces the following output:
b')<V]M92!T97AT\n'
Note: To learn how to convert back to binary format, visit
.a2b_uu()
.
Codebyte Example
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.