Newbie Question about COM Objects
Jeremy Howard
jeremyho at flashcom.com
Fri Feb 18 12:24:39 EST 2000
More information about the Python-list mailing list
Fri Feb 18 12:24:39 EST 2000
- Previous message (by thread): Newbie Question about COM Objects
- Next message (by thread): module for sed, the stream editor
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi everyone,
I'm having some problems finding any documentation on sending parameters to
COM objects in Python. I've included how the object is called from VB also
I've included how I'm *trying* to call the Object from Python.
VB code that works....
Dim SiebelConf as String
Dim oSiebel as Objectt
Dim ErrCode as Integer
SiebelConf = "C:\Temp\Siebel.cfg"
Set oSiebel = CreateObject("SiebelDataServer.ApplicationObject")
oSiebel.LoadObjects SiebelConf, ErrCode
All that happens here is I call the oSiebel.LoadObjects with two parameters,
first one is a string containing the name of the file I want the load and
the second parameter is an integer filled with an error code (0 if
successful) upon completion.
When I try to do the same thing in Python I get an Error..
>>> from win32com.client import Dispatch, constants
>>> from pywintypes import com_error
>>> oSiebel = Dispatch('SiebelDataServer.ApplicationObject')
>>> SiebelConf = 'c:\\Temp\\Siebel.cfg'
>>> ErrCode = 0
>>> oSiebel.LoadObjects(SiebelConf, ErrCode)
Traceback (innermost last):
File "<interactive input>", line 0, in ?
File "<COMObject SiebelDataServer.ApplicationObject>", line 2, in
LoadObjects
com_error: (-2147352571, 'Type mismatch.', None, 2)
I was under the impression that if I assign a number to ErrCode, Python
would see that variable as an Integer type. Or maybe I'm just way off
base.. Any help would be really appreciated. :)
Jeremy Howard
jeremyho at flashcom.com
- Previous message (by thread): Newbie Question about COM Objects
- Next message (by thread): module for sed, the stream editor
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list