I'm trying to get ba working with Python vai it's COM interface. This should be possible as python has a pretty good win32com.client library, you can for example read from excel very easily. I have no experience with VBA or C, so python is the easiest way for me to automate ba
So far I have the following
- Code: Select all
ba = Dispatch ("BettingAssistantCom.Application.ComClass") #Calls for ba
user_name = ba.getUserName
print user_name
Which correctly outputs my betfair user name
When I try to do a call for get Sports using
- Code: Select all
sports = ba.getSports
I get
- Code: Select all
(<COMObject <unknown>>, <COMObject <unknown>>, <COMObject <unknown>>, <COMObject <unknown>>, <COMO .... etc.....
I understand that this should return a list of sports and not an <unknown> value.
I've also tried ba.getSports(), which gives a python tuple (like a list) error...
- Code: Select all
sports = ba.getSports()
TypeError: 'tuple' object is not callable
If anyone has any experience interfacing with the COM server and can offer advice that would be great.
Thanks,