how to config a comserver in a customize dll?

Tim Roberts timr at probo.com
Mon May 23 02:18:29 EDT 2005


"ÒÊÃÉɽÈË" <dreamingpython at 163.com> wrote:

>When i use the below code to create a comserver on Windows OS£¬i find that
>the com was configed in the file
>python23com.dll,why? if i want to config it in my customize dll,how should i
>do? 

Python is not a compiled language.  It does not produce DLLs.  The real
executable code for a Python COM server is always contained in
python23com.dll.  The registry will tell the interpreter that is called by
python23com.dll where it can find your script.

>class TestPythonCom:
>    _public_methods_ = [ 'SplitString' ]
>    _reg_progid_ = "TestPythonCom.Application"
>    # NEVER copy the following ID
>    # Use "print pythoncom.CreateGuid()" to make a new one.
>    _reg_clsid_ = "{93D78ABA-1F6C-4B1C-97C7-C3700511415A}"
>
>    def SplitString(self, val):
>        return val

-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-list mailing list