<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1226" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Lucida Console">You should try CInt(Val(txtWage)), etc. "Val"
apparently returns a Double.</FONT></DIV>
<DIV><FONT face="Lucida Console"></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=keith@kmcomputers.co.uk href="mailto:keith@kmcomputers.co.uk">Keith
Hickling</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=python-win32@python.org
href="mailto:python-win32@python.org">python-win32@python.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, December 13, 2003 4:37
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [python-win32] Com</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am struggling to pass variables to a Python com
server.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If I call the Python class with say </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PyList = ComServer.taxcalc(500, 0, 0, 0, 0,
"461L", "W", 1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> this works fine and ptyhon will send back
the answer as a 3 part list which I can read in VB</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>As soon as I try to pass the same list but built
from text boxes as in</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PyList = ComServer.taxcalc(Val(txtWage),
Val(txtTotalWage), Val(txtP45Wage), Val(txtTotalTax), Val(txtP45Tax),
txtTaxCode, txtTaxPeriod, Val(txtWeekNumber))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Python throws an error 'invalid lieral for
int()'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I have tried to pass the list as a variant
list</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>PyList = ComServer.taxcalc(MyList)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>but I get the same error</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If I short circuit the function and return the
list I can read all the original values.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any ideas.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Martin</FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>Python-win32 mailing
list<BR>Python-win32@python.org<BR>http://mail.python.org/mailman/listinfo/python-win32<BR></BLOCKQUOTE></BODY></HTML>