[python-win32] Calling Python functions from Visual Basic
mhammond at keypoint.com.au
Fri Mar 5 21:39:51 EST 2004
> 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
> 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
* 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.
More information about the Python-win32