Mark> out_file.write('Content-type=application/octet-stream\n\n') Should be Content-type: application/octet-stream (colon, then space instead of equals). -- Skip Montanaro (skip at pobox.com) (847)971-7098