[Spambayes] Practical applications

Anthony Baxter anthony@interlink.com.au
Wed, 25 Sep 2002 16:50:37 +1000

>>> Anthony Baxter wrote
> I think he was asking for something the other way - a way to add
> a button/command to Outbreak which runs a python script. I don't know if
> that's possible - someone like MarkH may know.

Something similar came up on Python-list, so I followed up with Mark. 
Here's a summary:

>>> Mark wrote
> You would need to use the new Universal Gateway code (see 
> win32com\test\test_pycomtest.py) and create a server that implements 
> IDTExtensibility2.  From there, you should be able to use any of the VB 
> samples to move forward - all the params passed are standard COM 
> objects, so you should be able to do whatever you want.  You would also 
> need to get your head around COM events and how to connect to them from 
> Python, as addins are very much event based.
> I'm doing some work on a plugin now - but not using Python :(  And I 
> would *love* to see this work, especially in the face of the Bayes work 
> being done in Python.  Mail me if you need a hand.

I asked about hooking into "get new messages" to filter the message, and
also adding 'delete as ham/delete as spam' buttons. Mark's response was
that "Both are trivial once the [outlook-python] framework is in place".
(This is with full Outlook, not Outlook Express)

So, anyone who runs windows and Outlook feel like taking this on? 

Anthony, who is not at all dismayed that MH doesn't have a COM interface...