Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Uuencoding
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Python === The [[Python (programming language)|Python]] language supports uuencoding using the codecs module with the codec "uu": For Python 2 ''(deprecated/sunset as of January 1st 2020)'': <syntaxhighlight lang="console" highlight="3"> $ python -c 'print "Cat".encode("uu")' begin 666 <data> #0V%T end $</syntaxhighlight> For Python 3 ''where the codecs module needs to be imported and used directly'': <syntaxhighlight lang="console" highlight="2"> $ python3 -c "from codecs import encode;print(encode(b'Cat', 'uu'))" b'begin 666 <data>\n#0V%T\n \nend\n' $</syntaxhighlight> To decode, pass the whole file: <syntaxhighlight lang="console" highlight="2"> $ python3 -c "from codecs import decode;print(decode(b'begin 666 <data>\n#0V%T\n \nend\n', 'uu'))" b'Cat' </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)