Attached images by plain email.
Gaz
gaz082 at gmail.com
Mon Feb 20 15:27:36 EST 2006
Can you help me a little bit more? Please check this out:
102 part.addheader('Content-Transfer-Encoding', 'base64')
103 body = part.startbody('image/jpeg; name=c:\check.jpg')
104 base64.encode(open('check.jpg', 'rb'), body)
105
106
base64 = <module 'base64' from '/usr/lib/python2.3/base64.pyc'>,
base64.encode = <function encode>, builtin open = <type 'file'>, body =
<StringIO.StringIO instance>
IOError: [Errno 2] No such file or directory: 'check.jpg'
args = (2, 'No such file or directory')
errno = 2
filename = 'check.jpg'
strerror = 'No such file or directory'
More information about the Python-list
mailing list