hello Tutor,<div><br></div><div><div>
I need help on something very small...<br>
<br>
i am using urllib to write a query and what i want returned is 'FHI=128%2C128&FLO=1%2C1'<br>
<br>
i have tried the statement below and i have failed to get the above..<br>
<br>
x1,y1,x2,y2 = 1,1,128,128<br>
<br>
query = urllib.urlencode({'FHI':'x2,y2,', 'FLO':'x1,y1'})<br>
<br>
when that failed, i tried to use<br>
<br>
query ='FHI=%(x2)d%2C%(y2)d&FLO=%(x1)d%2C%(y1)d' % vars()<br>
<br>
returned an error "TypeError: not enough arguments for format string"<br>
<br>
i also tied<br>
<br>
query ='FHI=%d\%2C%d&FLO=%d\%2C%d' %(x1,x2,y1,y2)<br>
<br>
i got the error ValueError: unsupported format character 'C' (0x43) at index 8<br>
<br>
Where could i be going wrong!<br>
<br>
Johnson</div></div>