uuencode help
David M. Cook
dcook at redhat.com
Tue Sep 4 10:44:47 EDT 2001
On 04 Sep 2001 11:29:25 +0200, Martin von Loewis
<loewis at informatik.hu-berlin.de> wrote:
>Can you give an example? I was not able to reproduce any problems
>involving spaces and backticks.
A python script to generate a uuencoded file:
import uu
import os
filename = "/usr/games/chromium/data/png/chrome.jpg"
infile = open(filename, "r")
outfile = open("/tmp/chrome.uu", "w")
uu.encode(infile, outfile, os.path.basename(filename), 0644)
The commandline using the uuencode utility:
uuencode /usr/games/chromium/data/png/chrome.jpg chrome.jpg > chrome.uuencode
If you have the unix cmp utility, it will show the differences and which
byte they are at:
cmp -l chrome.uu chrome.uuencode
28 40 140
29 40 140
37 40 140
39 40 140
42 40 140
44 40 140
etc.
This is on a Red Hat 7.1 system with python 1.5.2.
Dave Cook
More information about the Python-list
mailing list