uuDecode problem
jepler at unpythonic.net
jepler at unpythonic.net
Wed Dec 7 11:38:00 EST 2005
Note that you can use the 'uu' encoding, which will handle
arbitrary-length input and give multi-line uuencoded output, including
the 'begin' and 'end' lines:
>>> print ("\377" * 120).encode("uu")
begin 666 <data>
M____________________________________________________________
M____________________________________________________________
>________________________________________
end
Otherwise, you should use something like
encoded = [binascii.b2a_uu(chunk)
for chunk in iter(lambda: someFile.read(45), "")]
to send at most 45 bytes to each call to b2a_uu.
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20051207/0fea59fd/attachment.sig>
More information about the Python-list
mailing list