ramblings, rants and red pills
Some of you might remember my calendaring experiment that happened almost one year ago. Well, there’s some news from that front, despite the fact I decided to abandon it.
SEARCH queries anymore.PROPFIND request, I download some 6MB of Calendaring data.[1]And the good news? Well, there’s some, too.
Well, there’s still some more bad news to add. Exchange migration is planned to be finished later in 2005. And I still regularly fall back on my posts when I search for more information on this topic on Google. (However, I also found a great example on ASPN, which is first here :))

But now to some of the tidbits of the above list:
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.
PROPFINDPROPFIND 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.
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 …
iCal.pyLast, 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.
So, where have I gone since the post in January? Not so far by some means–but a lot if you understand what progress I made with respect to some of the points outlined above. I feel much more confident to actually come up with a solution that works!
[1] I might eventually cut them by some good amount, once I know what properties I really need.
This is my electronic home with lots of different stuff about Mac's, the Life, Blogs, Quotes and more.
Leave a reply