[python-win32] OT: Syncing routes ...

Tim Golden mail at timgolden.me.uk
Mon Mar 22 11:05:13 CET 2010


On 19/03/2010 19:56, Clinton Lee Taylor wrote:
> Greetings ...
>
> I'm still very new to Python, so please excuss my request ... I have
> written some very basic Python utils and slowly get my head around
> Python and com objects in Windows ...
>
>   I was hoping that I might be able to bug the list for any pointers on
> syncing routes, that I could use to sync records from one DB to
> another ... Basically looking to sync Outlook Contacts into and from a
> MySQL DB.  Later, would like to extend this to include Windows Address
> Book, Thunderbird Contacts and maybe any other DateBase.

Well I'm no expert in this area, but since I've not seen any other
replies I'll have a stab. Your question is quite wide-ranging,
taking in several major software packages, all of which have
quite different access methods. You say you're new to Python
(and presumably to Windows development, if you're coming to terms
with COM). Do you have any other development experience?

Outlook contacts can be read via the so-called CDO libraries.
This is the definitive starting point:

   http://msdn.microsoft.com/en-us/library/ms988614%28EXCHG.65%29.aspx

and there's some good resources here:

   http://www.cdolive.com/default.htm

For the most part, CDO is easy enough to translate into Python.
I have some examples here (altho' not contact-related):

   http://timgolden.me.uk/python/win32_how_do_i/read-my-outlook-inbox.html
   http://timgolden.me.uk/python/win32_how_do_i/replace-outlook-attachments-with-links.html
   http://timgolden.me.uk/python/win32_how_do_i/create-an-mhtml-archive.html

and once you've got hold of the terms you need, you can easily
Google around for more.

Then you have the database side. You mention MySQL but you might be better off
using sqlite, an interface to which is included with Python in recent versions.
This is, of course, unless you have a truly huge list of contacts, or an
existing investment in MySQL.

   http://sqlite.org/
   http://docs.python.org/library/sqlite3.html

There certainly are Python bindings to MySQL altho' I'm not a user myself
so I'm not sure which ones favoured at the moment. Worth asking on the
main Python lists.

Hopefully that's enough to get you started. Feel free to post back with
more questions or info. If your questions aren't win32 specific you
might get more answers on the main Python mailing list:

   http://mail.python.org/mailman/listinfo/python-list

TJG


More information about the python-win32 mailing list