ramblings, rants and red pills
But now to some of the tidbits of the above list:
##The Exchange Server
I got to know that *somehow*, Microsoft crippled their Exchange Server before version 2003 XP1 in a way that it won’t work. More specifically: The examples on MSDN that show how a WebDAV `SEARCH` request is issued won’t work in Python or elsewhere, with the exception of Microsoft’s Windows-only XmlHttp Active X object.
Apparently, Service Pack 1 for Exchange 2003 fixes this, so there’s hope.
##The `PROPFIND`
`PROPFIND` is a WebDAV extension to HTTP requests. It allows one to dump all or specific properties of *all* elements in a WebDAV store. The good news here is, I can get all the data I want. The bad news is: I can’t filter it server-side, which means a 6MB dump each time I get the Calendar events!
I might get that down to 3MB or so, by carefully choosing the properties I *really* need, and do some filtering on the last changed date elsewhere, so there’s hope as well.
##The Keychain
One of the greatest things so far is the discovery of the [Keychain Framework][] on SourceForge. Thanks [bdash][] for the link and the code example.
With the help of this Framework and [PyObjC][], you can really *easily* access the Keychain, create new entries and–more important–fetch passwords for existing entries! Whew!
Some sample code looks like this:
import objc, new
def getPassword( aService, anAccount = ” ):
“”"Will get the password for aService/anAccount from the Keychain”"”
Keychain = new.module(’Keychain’)
objc.loadBundle(’Keychain’, Keychain.__dict__,
bundle_path=’/Library/Frameworks/Keychain.framework’)
defaultKeychain = Keychain.Keychain.defaultKeychain()
return defaultKeychain.passwordForInternetServer_forAccount_port_path_inSecurityDomain_protocol_auth_( aService, anAccount, 0, ”, ”, 0, 0 )
Pay *close* attention to the trailing “_” at the end of every function name! Yes, I got caught here in the first place!
Anyway, this is a *real* helper and I’m thinking of some other frameworks I could use …
## The `iCal.py`
Last, but not least, I found [iCal.py][], a little helper class that loads and interprets iCalendar files. It’s far from complete but a very good start, indeed–and it saves me from learning [Ruby][]. This is my electronic home with lots of different stuff about Mac's, the Life, Blogs, Quotes and more.
Leave a reply