<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, Baby Names - Continued</title>
    <link>http://www.mapleprimes.com/posts/38177-Baby-Names--Continued</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 20:17:20 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 20:17:20 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, Baby Names - Continued</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, Baby Names - Continued</title>
      <link>http://www.mapleprimes.com/posts/38177-Baby-Names--Continued</link>
    </image>
    <item>
      <title>In Python</title>
      <link>http://www.mapleprimes.com/posts/38177-Baby-Names--Continued?ref=Feed:MaplePrimes:Baby Names - Continued:Comments#comment68350</link>
      <itunes:summary>&lt;p&gt;Now, compare that with getting the html page in Python. Say, in Python 2.6,&lt;/p&gt;
&lt;pre&gt;
&amp;gt;&amp;gt;&amp;gt; from urllib import *
&amp;gt;&amp;gt;&amp;gt; par = urlencode({'year':2000, 'top':20, 'number':'n'})
&amp;gt;&amp;gt;&amp;gt; f = urlopen(&amp;quot;http://www.ssa.gov/cgi-bin/popularnames.cgi&amp;quot;, par)
&amp;gt;&amp;gt;&amp;gt; print f.read()
&lt;/pre&gt;
&lt;p&gt;Alec&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Baby Names - Continued</description>
      <guid>68350</guid>
      <pubDate>Fri, 19 Dec 2008 08:40:23 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>re-usable functions</title>
      <link>http://www.mapleprimes.com/posts/38177-Baby-Names--Continued?ref=Feed:MaplePrimes:Baby Names - Continued:Comments#comment82397</link>
      <itunes:summary>&lt;p&gt;The reason that it looks shorter in python is because someone's already written its functions urlencode, urlopen, etc.&lt;/p&gt;
&lt;p&gt;So one might reasonably ask how hard it would be to write the equivalent functions in maple, so as not to have to type all that out like John did. That's how to use Maple effectively -- to write re-usable procedures for repeating queries. Also possible is to distribute them (as the python community does) for others to use.&lt;/p&gt;
&lt;p&gt;For example, are the undocumented &lt;b&gt;HTTP:-Post&lt;/b&gt; and &lt;b&gt;HTTP:-URLEncode&lt;/b&gt; close, or do they require changes in order to do this task?&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Baby Names - Continued</description>
      <guid>82397</guid>
      <pubDate>Fri, 19 Dec 2008 09:16:37 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>HTTP:-URLEncode</title>
      <link>http://www.mapleprimes.com/posts/38177-Baby-Names--Continued?ref=Feed:MaplePrimes:Baby Names - Continued:Comments#comment68348</link>
      <itunes:summary>&lt;p&gt;HTTP:-URLEncode does something different - it converts spaces to %20 etc. - similar to what I did in my other blog post, &lt;a href="http://www.mapleprimes.com/blog/alec/accessing-magma-from-maple"&gt;Accessing MAGMA from Maple&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;pre&gt;
HTTP:-URLEncode(&amp;quot;year=2000&amp;amp;top=20&amp;amp;number=n&amp;quot;);

                &amp;quot;year%3D2000%26top%3D20%26number%3Dn&amp;quot;
&lt;/pre&gt;
&lt;p&gt;which is useless in this case.&lt;/p&gt;
&lt;p&gt;While urlencode in Python takes a dictionary - which is a hash-table similar to table in Maple, and writes it as a string, 'top=20&amp;amp;number=n&amp;amp;year=2000' in this example.&lt;/p&gt;
&lt;p&gt;It's hard to tell exactly what HTTP:-Post does without documentation, because it refers to some other procedures from the HTTP module, and I hate to&amp;nbsp;look through&amp;nbsp;long code without comments.&lt;/p&gt;
&lt;p&gt;Trying to use it as in Python gives&lt;/p&gt;
&lt;pre&gt;
HTTP:-Post(&amp;quot;http://www.ssa.gov/cgi-bin/popularnames.cgi&amp;quot;,
    &amp;quot;year=2000&amp;amp;top=20&amp;amp;number=n&amp;quot;);

                               200, &amp;quot;&amp;quot;
&lt;/pre&gt;
&lt;p&gt;which means that the post was successful (code 200 means OK), but the response seems to be lost during processing - perhaps,&amp;nbsp;the problem is caused by&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Chunked_transfer_encoding"&gt;chunked transfer-encoding&lt;/a&gt;&amp;nbsp;of the response, for which the HTTP module seems to be missing the procedures.&lt;/p&gt;
&lt;p&gt;Alec&lt;/p&gt;
&lt;p&gt;PS Since developer(s) of the HTTP module didn't respond in the previous thread on this topic, cited somewhere in the Baby Names thread, he/she/they, probably, won't respond here as well. -Alec&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Baby Names - Continued</description>
      <guid>68348</guid>
      <pubDate>Mon, 22 Dec 2008 01:13:08 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>(:-D )</title>
      <link>http://www.mapleprimes.com/posts/38177-Baby-Names--Continued?ref=Feed:MaplePrimes:Baby Names - Continued:Comments#comment68293</link>
      <itunes:summary>&lt;p&gt;&lt;maple&gt;&lt;/maple&gt;(:-D )&lt;/p&gt;</itunes:summary>
      <description>The latest comments added to the Post, Baby Names - Continued</description>
      <guid>68293</guid>
      <pubDate>Wed, 24 Dec 2008 23:59:11 Z</pubDate>
      <itunes:author>McRaY_Math</itunes:author>
      <author>McRaY_Math</author>
    </item>
  </channel>
</rss>