<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Lucida Console">Another way to run Python from Visual Basic is 
to use the Microsoft Script Control and ActiveX Python from 
ActiveState.</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=mhammond@keypoint.com.au href="mailto:mhammond@keypoint.com.au">Mark 
  Hammond</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=rasjidw@openminddev.net 
  href="mailto:rasjidw@openminddev.net">'Rasjid Wilcox'</A> ; <A 
  title=python-win32@python.org 
  href="mailto:python-win32@python.org">python-win32@python.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, March 05, 2004 6:39 
PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [python-win32] Calling 
  Python functions from Visual Basic</DIV>
  <DIV><BR></DIV>&gt; The former seems to require creating the COM component 
  and<BR>&gt; registering it as a<BR>&gt; service, the latter two require 
  running an XML-RPC or SOAP server.<BR><BR>Just to be clear, in the 
  nomenclature of win32com, you are registering a<BR>'COM server'.&nbsp; This 
  generally will not be a windows service.<BR><BR>&gt; The advantage of the 
  former I assume is speed, the latter two<BR>&gt; portability.<BR>&gt;<BR>&gt; 
  Are there any other methods that I have missed?<BR><BR>COM is pretty simple to 
  get going too, which would be an advantage - nothing<BR>in the middle!&nbsp; 
  I'm not familiar with using SOAP or XML-RPC from VB.<BR><BR>&gt; In terms of 
  examples for creating a COM object using Python,<BR>&gt; I have found<BR>&gt; 
  <A 
  href="http://www.hps1.demon.co.uk/users/andy/pyvb/">http://www.hps1.demon.co.uk/users/andy/pyvb/</A> 
  which is dated 4<BR>&gt; June 1997.&nbsp; Is<BR>&gt; this example still valid 
  for current versions of Python and win32all?<BR><BR>Generally, yes.&nbsp; The 
  only things I could see that would be done differently<BR>are:<BR>* Remove the 
  import of 'ni' - this was a very old Python module.<BR>* 
  win32com.server.register has a HandleCommandLine() method that 
  would<BR>generally be used, rather than the com object itself parsing sys.argv 
  -<BR>although it could still choose to if it 
  desired.<BR><BR>Mark<BR><BR><BR>_______________________________________________<BR>Python-win32 
  mailing list<BR><A 
  href="mailto:Python-win32@python.org">Python-win32@python.org</A><BR><A 
  href="http://mail.python.org/mailman/listinfo/python-win32">http://mail.python.org/mailman/listinfo/python-win32</A><BR></BLOCKQUOTE></BODY></HTML>