Python Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

Python Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
Socket / SSL
SFTP
SMTP
Spider
SSH Key
SSH
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

More Examples...
String
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA
Bzip2
LZW

 

 

 

 

 

 

 

Fetch XMP String Property Values

Fetch simple string properties from XMP.

Download Chilkat Python Library

import sys
import chilkat

xmp = chilkat.CkXmp()

success = xmp.UnlockComponent("Anything for 30-day trial")
if (success == False):
    print "Failed to unlock component"
    sys.exit()

success = xmp.LoadAppFile("xmpExample.jpg")
if (success == False):
    print xmp.lastErrorText()
    sys.exit()

#  How many XMP docs are embedded?
if (xmp.get_NumEmbedded() == 0):
    print "No XMP metdata found!"
    sys.exit()

#  Get the 1st (and usually only) XMP document:
xml = xmp.GetEmbedded(0)

#  Fetch and display some simple properties:

propVal = xmp.getSimpleStr(xml,"Iptc4xmpCore:Location")
print propVal

propVal = xmp.getSimpleStr(xml,"Iptc4xmpCore:CountryCode")
print propVal


 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.