[python-win32] Calling Python functions from Visual Basic
DogWalker
forestiero at qwest.net
Fri Mar 5 22:30:00 EST 2004
Another way to run Python from Visual Basic is to use the Microsoft Script Control and ActiveX Python from ActiveState.
----- Original Message -----
From: Mark Hammond
To: 'Rasjid Wilcox' ; python-win32 at python.org
Sent: Friday, March 05, 2004 6:39 PM
Subject: RE: [python-win32] Calling Python functions from Visual Basic
> The former seems to require creating the COM component and
> registering it as a
> service, the latter two require running an XML-RPC or SOAP server.
Just to be clear, in the nomenclature of win32com, you are registering a
'COM server'. This generally will not be a windows service.
> The advantage of the former I assume is speed, the latter two
> portability.
>
> Are there any other methods that I have missed?
COM is pretty simple to get going too, which would be an advantage - nothing
in the middle! I'm not familiar with using SOAP or XML-RPC from VB.
> In terms of examples for creating a COM object using Python,
> I have found
> http://www.hps1.demon.co.uk/users/andy/pyvb/ which is dated 4
> June 1997. Is
> this example still valid for current versions of Python and win32all?
Generally, yes. The only things I could see that would be done differently
are:
* Remove the import of 'ni' - this was a very old Python module.
* win32com.server.register has a HandleCommandLine() method that would
generally be used, rather than the com object itself parsing sys.argv -
although it could still choose to if it desired.
Mark
_______________________________________________
Python-win32 mailing list
Python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20040305/cd38a945/attachment.html
More information about the Python-win32
mailing list