Thank you for showing me the POST request, I will defiantly learn a lot from that.<br><br><div class="gmail_quote">On Wed, Jan 5, 2011 at 7:26 PM, Tim Harig <span dir="ltr"><<a href="mailto:usernet@ilthio.net">usernet@ilthio.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On 2011-01-06, Slie <<a href="mailto:stackslip@gmail.com">stackslip@gmail.com</a>> wrote:<br>
[reformated to <80 columns per RFC 1855 guidelines]<br>
<div class="im">> I have read several examples on python post requests but I'm not sure<br>
> mine needs to be that complicated.<br>
<br>
</div>>From the HTML example on the page you posted:<br>
<br>
<form action='<a href="https://chart.googleapis.com/chart" target="_blank">https://chart.googleapis.com/chart</a>' method='POST'><br>
<input type="hidden" name="cht" value="lc" /><br>
<input type="hidden" name="chtt" value="This is | my chart" /><br>
<input type='hidden' name='chs' value='600x200' /><br>
<input type="hidden" name="chxt" value="x,y" /><br>
<input type='hidden' name='chd' value='t:40,20,50,20,100'/><br>
<input type="submit" /><br>
</form><br>
<br>
you can retreive the same chart from Python:<br>
<br>
Python 3.1.2 (r312:79147, Oct 9 2010, 00:16:06)<br>
[GCC 4.4.4] on linux2<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> import urllib.request, urllib.parse<br>
>>> params = urllib.parse.urlencode({'cht':'lc', 'chtt':'This is | my<br>
>>> chart',<br>
... 'chs':'600x200', 'chxt':'x,y', 'chd':'t:40,20,50,20,100'})<br>
>>> chart = urllib.request.urlopen('<a href="https://chart.googleapis.com/chart" target="_blank">https://chart.googleapis.com/chart</a>',<br>
... data = params).read()<br>
>>> chartFile = open("chart.png", 'wb')<br>
>>> chartFile.write(chart)<br>
10782<br>
>>> chartFile.close()<br>
<font color="#888888">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</font></blockquote></div><br>