On 23-Jul-10 2:29 PM, Tim Roberts wrote:
  Trent Nelson wrote:
  >>>  import wx, wx.activex
  >>>  app = wx.PySimpleApp()
  >>>  f = wx.Frame(None, -1, "")
  >>>  clsid = wx.activex.CLSID('TWS.TwsCtrl.1')
*** axw = wx.activex.ActiveXWindows(f, clsid)
  >>>  wx.activex.GernerateAXModule(axw, 'Tws', '.', verbose=True)

That doesn't run an event loop.  It might set up a message queue, but in
order to run an event loop and cause window messages to be dispatched,
you have to call app.MainLoop().

Yeah, unfortunately, I can't get far enough to call app.MainLoop() -- that wx.activex.ActiveXWindows(f, clsid) line crashes python.exe.

Is this a GUI component?

That's what's annoying -- it shouldn't be (the API is data-driven, it doesn't expose any UI controls), but it looks like it's been written as an ActiveX GUI component anyway. (I think the target audience for the ActiveX component is VB developers, so the developer use case they're targeting is "drag tws.ocx onto your form".)

They provide C++ and Java socket-oriented interfaces as well, so I'll have a play around with those instead. Thanks for confirming my suspicions.

Regards,

        Trent.

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

Reply via email to