[python-win32] Missing methods from result of Dispatch or EnsureDispatch

2011-02-25 Thread Parand Tony Darugar
Hello,

I'm attempting to use COM to connect with Microsoft Dynamics GP via eConnect. I 
have a working VB program, and I also have a working IronPython program. 
However, I can't seem to get it to work with win32com.

The main assembly I'm trying to get at is 
Microsoft.Dynamics.GP.eConnect.eConnectMethods. In VB this looks like:

Dim eConCall As Microsoft.Dynamics.GP.eConnect.eConnectMethods

And in IronPython I'm able to:

clr.AddReference(Microsoft.Dynamics.GP.eConnect)
from Microsoft.Dynamics.GP.eConnect import eConnectMethods
connect = eConnectMethods()
connect.eConnect_EntryPoint(...)

In cPython 2.6 with win32com I'm able to do the Dispatch or EnsureDispatch, but 
the resulting handle has no usable methods:

 em = 
 win32com.client.gencache.EnsureDispatch(Microsoft.Dynamics.GP.eConnect.eConnectMethods)
 dir(em)  # only public methods are CLSID and coclass_clsid
 instance = em()
AttributeError: _eConnectMethods instance has no __call__ method

 em.eConnect_EntryPoint(...)
AttributeError: 'win32com.gen_py.7120EE94-41A9-39FF-A2B4-C0F9D2B0897Dx0x10x0._e
ConnectMethods._eConnectMethods instance at 0x12286632' object has no 
attribute 'eConnect_EntryPoint'

Any ideas? Words of wisdom would be most appreciated.

Thanks,

Parand


  
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Missing methods from result of Dispatch or EnsureDispatch

2011-02-25 Thread Tim Roberts
Parand Tony Darugar wrote:
 I'm attempting to use COM to connect with Microsoft Dynamics GP via eConnect. 
 I have a working VB program, and I also have a working IronPython program. 
 However, I can't seem to get it to work with win32com.

 The main assembly I'm trying to get at is 
 Microsoft.Dynamics.GP.eConnect.eConnectMethods. In VB this looks like:

 Dim eConCall As Microsoft.Dynamics.GP.eConnect.eConnectMethods

 And in IronPython I'm able to:

 clr.AddReference(Microsoft.Dynamics.GP.eConnect)
 from Microsoft.Dynamics.GP.eConnect import eConnectMethods
 connect = eConnectMethods()
 connect.eConnect_EntryPoint(...)

Perhaps I'm missing something, but in both cases there, you are creating
a .NET object from a .NET assembly, not a COM object.  It's possible
Microsoft has a parallel interface available for COM apps, but there's
not necessarily any relationship between their object models.

Do you have an example that shows Dynamics being used from a non-managed
COM application?

-- 
Tim Roberts, t...@probo.com
Providenza  Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Missing methods from result of Dispatch or EnsureDispatch

2011-02-25 Thread Preston Landers
On Fri, Feb 25, 2011 at 1:14 PM, Parand Tony Darugar tdaru...@yahoo.comwrote:


 - Outside of Ironpython, is there a reasonable way to interaction with .Net
 objects/assemblies in Python?


I haven't worked with it myself, but it looks like this is an option:

http://pythonnet.sourceforge.net/

thanks,
Preston
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32