1#!/usr/bin/env python 2""" 3This script prints some information on 'My Card' record using 4the AddressBook C API. 5""" 6from AddressBook import * 7 8def main(): 9 book = ABGetSharedAddressBook() 10 11 me = ABGetMe(book) 12 emails = ABRecordCopyValue(me, kABEmailProperty) 13 14 print "You have %d email adresses"%(ABMultiValueCount(emails),) 15 16 for idx in range(ABMultiValueCount(emails)): 17 value = ABMultiValueCopyValueAtIndex(emails, idx) 18 print "Email %d: %s"%(idx+1, value) 19 20if __name__ == "__main__": 21 main() 22