I communicated with the win32 extension package along with some demo code that I found. I spoke in detail about this process to this topic . I don't want to reproduce all of this here, but here is a short version (click the link above for details).
- Download and install the pywin32 extension .
- Grab the code Tim Golden wrote for this very task.
- Save the Tim code as a module on your own computer.
- Call the
property_sets method of your new module (supplying the necessary file path). The method returns a generator object that is iterable. See the following sample code and output.
(This works for me in XP, at least.)
eg.
import your_new_module propgenerator= your_new_module.property_sets('[your file path]') for name, properties in propgenerator: print name for k, v in properties.items (): print " ", k, "=>", v
The output of the above code will look something like this:
DocSummaryInformation PIDDSI_CATEGORY => qux SummaryInformation PIDSI_TITLE => foo PIDSI_COMMENTS => flam PIDSI_AUTHOR => baz PIDSI_KEYWORDS => flim PIDSI_SUBJECT => bar
Jelliclecat
source share