[python-win32] Com
Keith Hickling
keith at kmcomputers.co.uk
Sat Dec 13 19:37:50 EST 2003
Hi,
I am struggling to pass variables to a Python com server.
If I call the Python class with say
PyList = ComServer.taxcalc(500, 0, 0, 0, 0, "461L", "W", 1)
this works fine and ptyhon will send back the answer as a 3 part list which I can read in VB
As soon as I try to pass the same list but built from text boxes as in
PyList = ComServer.taxcalc(Val(txtWage), Val(txtTotalWage), Val(txtP45Wage), Val(txtTotalTax), Val(txtP45Tax), txtTaxCode, txtTaxPeriod, Val(txtWeekNumber))
Python throws an error 'invalid lieral for int()'
I have tried to pass the list as a variant list
PyList = ComServer.taxcalc(MyList)
but I get the same error
If I short circuit the function and return the list I can read all the original values.
something is happening with the ptyhon function probably to do with '461L'. I dont understand why I can pass the variables as in the first example but not the second.
Any ideas.
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20031214/dba7ff71/attachment.html
More information about the Python-win32
mailing list