M
mcl
My Code
`import os
from PIL import Image
from iptcinfo import IPTCInfo
info = IPTCInfo('test.jpg')
print info.keywords, info.supplementalCategories, info.contacts
caption = info.data['caption/abstract']
print caption`
running Win XP SP3
I get the message
No module: iptcinfo
I have downloaded iptcinfo and placed it in python27\Lib\site-packages
\iptcinfo
I guessed that was the right place, because that is where PIL ended
up, but that had a fancy installer with it.
As you will appreciate, I am very much an amateur in all this. I can
code a bit of python, but where everything goes and links is a
complete mystery. All I want is to write a quick script which
extracts the Caption field from a directory of JPEGS. I get the
filenames and the dimensions with PIL, but I need IPTCinfo to get at
the Caption field.
If anyone can throw any light on what I need to do or which stupid
mistake I have made, I would be most grateful.
Richard
`import os
from PIL import Image
from iptcinfo import IPTCInfo
info = IPTCInfo('test.jpg')
print info.keywords, info.supplementalCategories, info.contacts
caption = info.data['caption/abstract']
print caption`
running Win XP SP3
I get the message
No module: iptcinfo
I have downloaded iptcinfo and placed it in python27\Lib\site-packages
\iptcinfo
I guessed that was the right place, because that is where PIL ended
up, but that had a fancy installer with it.
As you will appreciate, I am very much an amateur in all this. I can
code a bit of python, but where everything goes and links is a
complete mystery. All I want is to write a quick script which
extracts the Caption field from a directory of JPEGS. I get the
filenames and the dimensions with PIL, but I need IPTCinfo to get at
the Caption field.
If anyone can throw any light on what I need to do or which stupid
mistake I have made, I would be most grateful.
Richard