Win32 COM question

Scott Hathaway slhath at home.com
Sat Nov 17 22:30:58 EST 2001


No, python works with all COM servers.  Post your exact error and maybe we
can help.

Thanks,
Scott

"Michael Kelly" <mkelly2002NOSPAM at earthlink.net> wrote in message
news:sn4dvtcfns56ftb2g7imjhgkodjvrt8gnh at 4ax.com...
>
> Hi all.  I've just started trying out python and I have
> a question about how it is to use an InProcess
> COM server with it.  As example I have a COM
> dll that does .ini file stuff that has a dual interface
> and a type library.  In VB I have to make sure
> it's selected in References then I can just do
> something like:
>
> Dim IniObj As New ComIniFile
>   Set IniObj = CreateObject("IniLib.ComIniFile")
>   IniObj.FileName = App.Path & "\ComIniFileTest.ini"
>   IniObj.ReadSections MyStrings
>
>
> Following the python quick start tips for COM
> I installed the Win32all with PythonWin
> and tried this:
>
> import win32com.client
> o = win32com.client.Dispatch("IniLib.ComIniFile")
> o.FileName = "C:\Windows\Temp\TryIni.ini"
> o.WriteString("StringSection", "Key", "SectionIsPun")
>
> And I get error messages to the effect that module
> types cannot be executed so it leads me to wonder
> if this only works for OleAutomation .exe programs
> such as MS Word or can you really use COM
> .dlls and ActiveX controls??
>
> TIA
>
>
> Mike
>
> --
>
> "I don't want to belong to any club that would have me as a member."
>     -- Groucho Marx





More information about the Python-list mailing list