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
pgpK0PRYLozaB.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list
