You need to install Pythonnet
- Code: Select all
pip3 install pythonnet
Import clr
Add a reference to the BettingAssistantCom.dll
You can then import the ComClass
Finally, create an instance of the ComClass
- Code: Select all
import clr
clr.AddReference("c:/Program Files (x86)/Betting Assistant/BettingAssistantCom.dll")
from BettingAssistantCom.Application import ComClass
ba = ComClass()
From here you can access the COM methods:
- Code: Select all
user_name = ba.getUserName()
print (user_name)
sports = ba.getSports()
for s in sports:
print(f'{s.sport} {s.sportId}')