win32com question using R com interface 
Author Message
 win32com question using R com interface

I have been trying to translate some Visual Basic code to python and
have been running into a slight problem

I am having some problems sending vectors or arrays across the interface.

here is the VB code

Dim x As StatConnector
Dim i3(5) As Integer
i3(1) = 5
i3(2) = 4
i3(3) = 3
i3(4) = 2
i3(5) = 1
Set x = New StatConnector
x.Init ("R")
x.SetSymbol "i3", i3

Here is the python code

from win32com.client import Dispatch
i3 = (5,4,3,2,1)
x=Dispatch("StatConnectorSrv.StatConnector")
x.Init("R")
x.SetSymbol("i3", i3)

This results in an error
File "<COMObject StatConnectorSrv.StatConnector>", line 2, in SetSymbol
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None,
None, None, 0, -2147024809), None)

Now x.SetSymbol("i3", "foo") or x.SetSymbol("i3", 3.0) works just fine.
    So, the question is are the two codes equivalent or am I sending the
wrong thing (the tuple) to the server?

Any help would be appreciated.

Brian Kelley
Whitehead Institute for Biomedical Research



Tue, 24 Aug 2004 02:52:34 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Accessing secondary COM interface with win32com

2. Using COM objects as dictionaries in win32com.

3. Problem setting COM property using win32com

4. Unable to use win32com on Ecco COM server despite success with VB and Perl COM

5. Question about using event in win32com

6. Using multiple COM interfaces

7. COM: Interface Implementation question

8. EiffelCOM Question re: ARRAYS in COM Interface...

9. how to register COM interface from python COM-server

10. win32com COM-server and py2exe

11. win32com: get error 80004005 in attempt to use a pythom COM serve r

12. win32com: raising com-event

 

 
Powered by phpBB® Forum Software