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