# Collection of code snippets by Arne Vajhøj 
# (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
from win32com.client import *
import pythoncom

print("COM/Python win32:")
test = DispatchEx("Test.CoTest", "\\\\ARNEPC5")
print("123 + 345 = %d" % test.Add(123, 456))
print("ABC + XYZ = %s" % test.Concat("ABC", "XYZ"))
print("IV = %d SV = %s" % (test.IV, test.SV))
test.IV = 123
test.SV = "ABC"
print("IV = %d SV = %s" % (test.IV, test.SV))
