[python-win32] Client site not available

Mark Hammond mhammond at skippinet.com.au
Mon Jan 23 23:26:53 CET 2006


> 1) I wish to be able to use the events available in the object as well,
> and after much reading  (and purchasing of your book, Mark - which
> helped ALOT in several other areas - thank you!) I was left feeling a
> bit lost in the 'events' arena.  Here is the code I am attempting (short
> and simple) atm, which responds with "AttributeError:
> '<win32com.client.COMEventClass instance at 0x12436112>' object has no
> attribute '_typelib_guid_'":
>
> ################## Code snippet [start]
> from win32com.client import DispatchWithEvents
> class SwiperEvents(object):

Try leaving the events class as an "old style" class (ie, don't derive from
object)

> 2) (and this is probably related to the first thing) - when I monitor
> the CardData property for changes 'manually' (with a loop) it never
> changes - no matter how many card swipes I attempt.  COULD this be a
> result of the PortOpen property not actually making the necessary
> connection in the OCX and just 'acting' like it was set?:

I'm afraid I've no idea.  Can you show the VBScript code that does work, and
the version re-written in Python that doesn't?  You should use python.exe to
test in the first instance, and cscript.exe (not wscript.exe) to test the
VBScript.

Mark.



More information about the Python-win32 mailing list