[python-win32] Wrong default value for optional argument in makepy signature.

2010-11-09 Thread Åsmund Hjulstad
I keep getting the following exception when making some calls on a ActiveX DLL library (PISDK). Problem partially solved, posting in case others may find it usefull. TypeError: The Python instance can not be converted to a COM object I have traced it down to an optional parameter, that is set to

[python-win32] Makepy does not generate all secondary interfaces?

2010-11-09 Thread Åsmund Hjulstad
I am struggling with secondary interfaces and makepy I have generated an interface with makepy from a library ( PISDKCommon 1.0 Type Library ). It has an object, PIAsynchStatus, that exposes a secondary interface; IPIAsynchStatus2. I cannot find the secondary interface in the generated module, tho

Re: [python-win32] SolidWorks & pywin32?

2010-11-09 Thread Samu Niveri
> Samu Niveri wrote: > > > > I have created small app for SWx and encountered a minor problem with > > it. When trying to read properties from SWx-files using API-command: > > CustomPropertyManager.Get2(ByVal FieldName As String, ByRef ValOut As > > String, ByRef ReesolvedValOut As String) I get

Re: [python-win32] Wrong default value for optional argument in makepy signature.

2010-11-09 Thread Tim Roberts
Åsmund Hjulstad wrote: > I keep getting the following exception when making some calls on a > ActiveX DLL library (PISDK). Problem partially solved, posting in case > others may find it usefull. > > TypeError: The Python instance can not be converted to a COM object > > I have traced it down to an

Re: [python-win32] Makepy does not generate all secondary interfaces?

2010-11-09 Thread Åsmund Hjulstad
After a some more struggling: The reason why some files ended up in a subdirectory, was that I used the gencache.EnsureDispatch call, which defaults to "on demand" building of class interfaces. Not that it matters, though, I have the same problem if I generate using makepy.py on the command line,

Re: [python-win32] Makepy does not generate all secondary interfaces?

2010-11-09 Thread Tim Roberts
Åsmund Hjulstad wrote: > ... > My latest attempt is > > pisdkcommonlib = ('{76A44786-EBC8-11D3-BDC5-00C04F779EB2}', 0, 1, 0) > win32com.client.makepy.GenerateChildFromTypeLibSpec("IPIAsynchStatus2", > pisdkcommonlib, 1) > > which gives me > ... > ImportError: No module named IPIAsynchStatus2 > > An

Re: [python-win32] Wrong default value for optional argument in makepy signature.

2010-11-09 Thread Åsmund Hjulstad
2010/11/9 Tim Roberts : > Åsmund Hjulstad wrote: >> I keep getting the following exception when making some calls on a >> ActiveX DLL library (PISDK). Problem partially solved, posting in case >> others may find it usefull. >> >> TypeError: The Python instance can not be converted to a COM object >

Re: [python-win32] Makepy does not generate all secondary interfaces?

2010-11-09 Thread Åsmund Hjulstad
2010/11/9 Tim Roberts : > Åsmund Hjulstad wrote: >> ... >> My latest attempt is >> >> pisdkcommonlib = ('{76A44786-EBC8-11D3-BDC5-00C04F779EB2}', 0, 1, 0) >> win32com.client.makepy.GenerateChildFromTypeLibSpec("IPIAsynchStatus2", >> pisdkcommonlib, 1) >> >> which gives me >> ... >> ImportError: No

Re: [python-win32] Makepy does not generate all secondary interfaces?

2010-11-09 Thread Tim Roberts
Åsmund Hjulstad wrote: > 2010/11/9 Tim Roberts : >> Åsmund Hjulstad wrote: >>> ... >>> My latest attempt is >>> >>> pisdkcommonlib = ('{76A44786-EBC8-11D3-BDC5-00C04F779EB2}', 0, 1, 0) >>> win32com.client.makepy.GenerateChildFromTypeLibSpec("IPIAsynchStatus2", >>> pisdkcommonlib, 1) That's not the

Re: [python-win32] Makepy does not generate all secondary interfaces?

2010-11-09 Thread Åsmund Hjulstad
2010/11/9 Tim Roberts : > Åsmund Hjulstad wrote: My latest attempt is pisdkcommonlib = ('{76A44786-EBC8-11D3-BDC5-00C04F779EB2}', 0, 1, 0) win32com.client.makepy.GenerateChildFromTypeLibSpec("IPIAsynchStatus2", pisdkcommonlib, 1) > > That's not the correct usage.  Did you s