[python-win32] A shameless COM question

Marcus Low marcus at internetnowasp.net
Wed Apr 2 03:11:56 CEST 2008


Hi Tim,

Thank you for the alternative view, yes i have the twisted downloaded and 
inspecting it prior to this question.
My only concern would be this is because the said COM  component is made to 
run optimally in Windows and i am not sure i have the same
assurance when it comes to Twisted.  I needed the events because i need to 
inspect and log in nearly every level of the smtp transaction so just 
creating
a simple smtp was not the goal, the goal is to create a full fledge mail 
server with crazy control and logging.

I am not familiar with how Twisted is implemented in Windows, if it uses the 
specific windows apis and asynch model winsock2 directly for optimal
performance.

So do you still think i should stick with twisted? I am all open for 
suggestions.

Marcus.


----- Original Message ----- 
From: "Tim Roberts" <timr at probo.com>
To: "Python-Win32 List" <python-win32 at python.org>
Sent: Wednesday, April 02, 2008 6:07 AM
Subject: Re: [python-win32] A shameless COM question


> Marcus Low wrote:
>> Hi,
>>
>> I am aggressively trying to try and use python for my team's sub
>> commercial project. However we are using a com component and  i have the
>> example given in C#. It looks very simple to use and elegent in C# but
>> i need to do the same in python (minus the GUI of course)
>>
>> The C# example is :
>> http://www.internetnow.com.my/download/marcus/Csharp.txt
>>
>> I have generated from makepy the file :
>> http://www.internetnow.com.my/download/marcus/from_genpy.txt
>>
>> How do i even begin to use the same "event" notification in Pytonwin?
>> I have resorted to ask this shameless question given that
>> my COM knowledge is kinda rusty and i could only go as far as  :
>>
>>  SmtpMail = win32com.client.Dispatch("WeOnlyDo.wodSmtpServerCom.1")
>>  SmtpMail.Start()
>>  win32gui.PumpMessages()
>
> Please allow me to steer to conversation in a slightly different
> direction.  The code you posted shows using that COM component to create
> a very simple SMTP server.  There are MANY ways of solving that problem
> in Python without resorting to complicated external components.  If the
> problem you are trying to solve really is just the creation of an SMTP
> server, then forget about the COM component, and start searching for
> Pythonic solutions.  The Twisted module, for example, makes something
> like this almost trivial.
>
> -- 
> Tim Roberts, timr at probo.com
> Providenza & Boekelheide, Inc.
>
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32 




More information about the python-win32 mailing list