<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>A song for the lovers</title>
	
	<link>http://www.oluyede.org/blog</link>
	<description>Everything considered harmful</description>
	<pubDate>Sun, 31 Aug 2008 17:39:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/ASongForTheLovers" type="application/rss+xml" /><item>
		<title>Twisted interactive console</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/379796657/</link>
		<comments>http://www.oluyede.org/blog/2008/08/31/twisted-interactive-console/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 17:39:05 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[python twisted repl]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/2008/08/31/twisted-interactive-console/</guid>
		<description><![CDATA[As you all already know TwistedMatrix is great to write asynchronous event-driven network oriented programs: define how your protocol responds in case of events, attach some callbacks if you need them, wrap it in a factory and activate the reactor.

The reactor runs a giant loop in which events are processed in a non-blocking fashion. Sometimes, [...]]]></description>
			<content:encoded><![CDATA[<p>As you all already know <a href="http://twistedmatrix.com/">TwistedMatrix</a> is great to write asynchronous event-driven network oriented programs: define how your protocol responds in case of events, attach some callbacks if you need them, wrap it in a factory and activate the reactor.</p>

<p>The reactor runs a giant loop in which events are processed in a non-blocking fashion. Sometimes, though, everything a man needs it&#8217;s just to make it stop. At least for a while, at least for the sake of getting data from the user.</p>

<p>The most prominent example of a command line client program that needs to stop and wait is a REPL. The following kind of <a href="http://en.wikipedia.org/wiki/REPL">REPL</a> is a bit unorthodox, you&#8217;ll see.</p>

<p>The secret sauce (at least the one I found) to write such kind of interactive program in Twisted is <a href="http://twistedmatrix.com/documents/current/api/twisted.internet.stdio.html">twisted.internet.stdio.StandardIO</a>. It connects your <a href="http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IProtocol.html">protocol</a> to standard input and output:</p>


<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> Repl<span style="color: black;">&#40;</span>basic.<span style="color: black;">LineReceiver</span><span style="color: black;">&#41;</span>:
    delimiter = <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span>
    prompt_string = <span style="color: #483d8b;">'cmd&gt; '</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> prompt<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">transport</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">prompt_string</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> connectionMade<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: black;">sendLine</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Welcome to Console'</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">prompt</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> lineReceived<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, line<span style="color: black;">&#41;</span>:
        <span style="color: #808080; font-style: italic;"># blank line</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: #ff7700;font-weight:bold;">not</span> line:
            <span style="color: #008000;">self</span>.<span style="color: black;">prompt</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
            <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
        <span style="color: #008000;">self</span>.<span style="color: black;">issueCommand</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> issueCommand<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, command<span style="color: black;">&#41;</span>:
        <span style="color: #808080; font-style: italic;"># send the command to the server</span>
        d = sendCmd<span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%s%s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>command, <span style="color: #008000;">self</span>.<span style="color: black;">delimiter</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        d.<span style="color: black;">addCallback</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._checkResponse<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> _checkResponse<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, args<span style="color: black;">&#41;</span>:
        success, num_lines, data = args
        <span style="color: #ff7700;font-weight:bold;">if</span> num_lines <span style="color: #66cc66;">&gt;</span> <span style="color: #ff4500;">20</span>:
            <span style="color: #808080; font-style: italic;"># use less to display the response</span>
            <span style="color: #008000;">self</span>.<span style="color: black;">lessify</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #008000;">self</span>.<span style="color: black;">sendLine</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">prompt</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> lessify<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, data<span style="color: black;">&#41;</span>:
        p = <span style="color: #dc143c;">subprocess</span>.<span style="color: black;">Popen</span><span style="color: black;">&#40;</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;less&quot;</span><span style="color: black;">&#93;</span>, stdin=<span style="color: #dc143c;">subprocess</span>.<span style="color: black;">PIPE</span><span style="color: black;">&#41;</span>
        p.<span style="color: black;">communicate</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> connectionLost<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, reason<span style="color: black;">&#41;</span>:
        reactor.<span style="color: black;">stop</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>


<p>When the protocol it is connected to the standard output with</p>


<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;">stdio.<span style="color: black;">StandardIO</span><span style="color: black;">&#40;</span>TaskConsole<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
reactor.<span style="color: black;">run</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>


<p>the program displays the prompt, hence when a line is received from the standard input it is sent to the other protocol attached on the network and a callback is registered for the response. I also decided to use <em>less</em> to display the response if it&#8217;s more than some lines but that&#8217;s a detail.</p>

<p>The <em>sendCmd</em> function instantiate the networked protocol and its factory:</p>


<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> sendCmd<span style="color: black;">&#40;</span><span style="color: #dc143c;">cmd</span><span style="color: black;">&#41;</span>:
    factory = CFactory<span style="color: black;">&#40;</span><span style="color: #dc143c;">cmd</span><span style="color: black;">&#41;</span>
    reactor.<span style="color: black;">connectTCP</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'127.0.0.1'</span>, <span style="color: #ff4500;">1234</span>, factory<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span> factory.<span style="color: black;">deferred</span></pre></div></div>


<p>Then, when the server replies with some content we check to see if everything went ok and the reconstruct the whole response sending it back the REPL:</p>


<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">class</span> Client<span style="color: black;">&#40;</span>basic.<span style="color: black;">LineReceiver</span><span style="color: black;">&#41;</span>:
    delimiter = <span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\n</span>'</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> connectionMade<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #808080; font-style: italic;"># send the command received by the cmdline to the server</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">sendLine</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">factory</span>.<span style="color: #dc143c;">cmd</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">buffer</span> = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">cmd_success</span> = <span style="color: #008000;">True</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> lineReceived<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, line<span style="color: black;">&#41;</span>:
        <span style="color: #808080; font-style: italic;"># basic check error/success</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> line.<span style="color: black;">startswith</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'OK'</span><span style="color: black;">&#41;</span>:
            <span style="color: #ff7700;font-weight:bold;">return</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> line.<span style="color: black;">startswith</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'ERR'</span><span style="color: black;">&#41;</span>:
            <span style="color: #008000;">self</span>.<span style="color: black;">cmd_success</span> = <span style="color: #008000;">False</span>
            <span style="color: #ff7700;font-weight:bold;">return</span>
&nbsp;
        <span style="color: #ff7700;font-weight:bold;">if</span> line == <span style="color: #483d8b;">'END'</span>:
            <span style="color: #808080; font-style: italic;"># join the response at the end of it</span>
            <span style="color: #008000;">self</span>.<span style="color: black;">responseFinished</span><span style="color: black;">&#40;</span>
                <span style="color: #008000;">len</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">buffer</span><span style="color: black;">&#41;</span>, <span style="color: #483d8b;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>.<span style="color: black;">join</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>.<span style="color: black;">buffer</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
            <span style="color: #008000;">self</span>.<span style="color: black;">buffer</span> = <span style="color: black;">&#91;</span><span style="color: black;">&#93;</span>
        <span style="color: #ff7700;font-weight:bold;">else</span>:
            <span style="color: #008000;">self</span>.<span style="color: black;">buffer</span>.<span style="color: black;">append</span><span style="color: black;">&#40;</span>line<span style="color: black;">&#41;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> responseFinished<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, num_lines, data<span style="color: black;">&#41;</span>:
        <span style="color: #808080; font-style: italic;"># disconnect</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">sendLine</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'quit'</span><span style="color: black;">&#41;</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">transport</span>.<span style="color: black;">loseConnection</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
        <span style="color: #808080; font-style: italic;"># send back the response to the REPL</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">factory</span>.<span style="color: black;">deferred</span>.<span style="color: black;">callback</span><span style="color: black;">&#40;</span><span style="color: black;">&#40;</span>
            <span style="color: #008000;">self</span>.<span style="color: black;">cmd_success</span>, num_lines, data<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
&nbsp;
&nbsp;
<span style="color: #ff7700;font-weight:bold;">class</span> CFactory<span style="color: black;">&#40;</span>protocol.<span style="color: black;">ClientFactory</span><span style="color: black;">&#41;</span>:
    protocol = Client
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">def</span> <span style="color: #0000cd;">__init__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, <span style="color: #dc143c;">cmd</span><span style="color: black;">&#41;</span>:
        <span style="color: #008000;">self</span>.<span style="color: #dc143c;">cmd</span> = <span style="color: #dc143c;">cmd</span>
        <span style="color: #008000;">self</span>.<span style="color: black;">deferred</span> = defer.<span style="color: black;">Deferred</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>


<p>How cool is that? Not really to be honest. It has a big gigantic fault: every time you input a line a connection to the server is opened and closed. That&#8217;s bad, really bad.</p>

<p>It didn&#8217;t take too long to create a version that use just one connection:</p>


<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> connectionMade<span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
    <span style="color: #008000;">self</span>.<span style="color: black;">sendLine</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Welcome to Console'</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">self</span>.<span style="color: black;">factory</span> = CFactory<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">self</span>.<span style="color: black;">connector</span> = reactor.<span style="color: black;">connectTCP</span><span style="color: black;">&#40;</span>
        <span style="color: #483d8b;">'127.0.0.1'</span>, <span style="color: #ff4500;">1234</span>, <span style="color: #008000;">self</span>.<span style="color: black;">factory</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">self</span>.<span style="color: black;">prompt</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>


<p>We store the connector and the factory. <em>issueCommand</em> does not open a connection anymore, just:</p>


<div class="wp_syntax"><div class="code"><pre class="python python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">def</span> issueCommand<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, command<span style="color: black;">&#41;</span>:
    <span style="color: #008000;">self</span>.<span style="color: black;">connector</span>.<span style="color: black;">transport</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;%s%s&quot;</span> <span style="color: #66cc66;">%</span> <span style="color: black;">&#40;</span>command, <span style="color: #008000;">self</span>.<span style="color: black;">delimiter</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
    <span style="color: #008000;">self</span>.<span style="color: black;">factory</span>.<span style="color: black;">deferred</span>.<span style="color: black;">addCallback</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span>._checkResponse<span style="color: black;">&#41;</span></pre></div></div>


<p>We write directly to the transport of the connector (and not the one connected to the stdout) and register the callback on the factory&#8217;s deferred.</p>

<p>That&#8217;s better in my opinion and a nice start. I know that within <a href="http://twistedmatrix.com/documents/current/api/twisted.conch.stdio.html">twisted.conch.stdio</a> there&#8217;s something more evolved. I&#8217;ll try to look into it when I have more time.</p>

<p>You can find the <a href="http://share11.appspot.com/1022">first version</a> (bad) and the <a href="http://share11.appspot.com/1421">second version</a> (better) online.</p>

<p>What do you think about this try?</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=fGjcek"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=fGjcek" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=gwv05k"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=gwv05k" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/379796657" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/08/31/twisted-interactive-console/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F08%2F31%2Ftwisted-interactive-console%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/08/31/twisted-interactive-console/</feedburner:origLink></item>
		<item>
		<title>Status update</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/334252279/</link>
		<comments>http://www.oluyede.org/blog/2008/07/13/status-update/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 13:08:55 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[joblife python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=363</guid>
		<description><![CDATA[I am still alive, just don&#8217;t have time to blog something meaningful.

By the way, this is what I am doing/I have done recently:


    Patched httplib2 to support MD5-sess (at work)
    Patched soaplib to use httplib2 with the above patch (at work)
    All the above is because [...]]]></description>
			<content:encoded><![CDATA[<p>I am still alive, just don&#8217;t have time to blog something meaningful.</p>

<p>By the way, this is what I am doing/I have done recently:</p>

<ul>
    <li>Patched httplib2 to support MD5-sess (at work)</li>
    <li>Patched soaplib to use httplib2 with the above patch (at work)</li>
    <li>All the above is because we are interfacing with a couple of SOAP servers (in Java and .NET)</li>
    <li>Reading The Ruby Way by Hal Fulton and <span style="text-decoration: line-through;">JavaScript the Good Parts by Douglas Crockford (read)</span> Dreaming In Code by Scott Rosenberg</li>
    <li>Planning my vacation: I&#8217;ll be staying in London for 3 weeks, from the 27th of July to the 17th of August. If you want to catch up and drink something contact me at l dot oluyede at gmail dot com</li>
    <li>Bought a Nokia E51 which is UMTS/HDSPA/WiFi ready Symbian phone (and also cheap)</li>
    <li>Still reading a lot of stuff in my backlog</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=rYm1ej"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=rYm1ej" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=g4Jcij"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=g4Jcij" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/334252279" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/07/13/status-update/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F07%2F13%2Fstatus-update%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/07/13/status-update/</feedburner:origLink></item>
		<item>
		<title>Pinder 0.6.5</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/293292794/</link>
		<comments>http://www.oluyede.org/blog/2008/05/19/pinder-065/#comments</comments>
		<pubDate>Mon, 19 May 2008 07:02:13 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Pinder]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=362</guid>
		<description><![CDATA[In this new release of my Campfire API, Pinder 0.6.5, I fixed some bugs and added the methods ping() and topic() (which matches change_topic()) to the Room objects.

There is by the way an incompatible change: I do not distribute anymore BeautifulSoup and httplib2 with the library.

Go take it!
]]></description>
			<content:encoded><![CDATA[<p>In this new release of my <a href="http://www.campfirenow.com/">Campfire</a> API, <a href="http://dev.oluyede.org/pinder/">Pinder 0.6.5</a>, I fixed some bugs and added the methods <a href="http://dev.oluyede.org/pinder/api/pinder.room.Room-class.html#ping">ping()</a> and <em>topic() </em>(which matches <a href="http://dev.oluyede.org/pinder/api/pinder.room.Room-class.html#change_topic">change_topic()</a>) to the Room objects.</p>

<p>There is by the way an incompatible change: I do not distribute anymore <a href="http://crummy.com/software/BeautifulSoup">BeautifulSoup</a> and <a href="http://code.google.com/p/httplib2/">httplib2</a> with the library.</p>

<p><a href="http://dev.oluyede.org/pinder/">Go take it!</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=rUotUh"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=rUotUh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=thzFfh"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=thzFfh" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/293292794" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/05/19/pinder-065/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F05%2F19%2Fpinder-065%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/05/19/pinder-065/</feedburner:origLink></item>
		<item>
		<title>Twitter page for PyCon Italy</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/285324091/</link>
		<comments>http://www.oluyede.org/blog/2008/05/07/twitter-page-for-pycon-italy/#comments</comments>
		<pubDate>Wed, 07 May 2008 12:05:59 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[pycon]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=360</guid>
		<description><![CDATA[I opened a Twitter account for the PyCon Italy conference. I will try to keep updated as soon as things come up and the conference starts on Friday.

http://twitter.com/pyconit
]]></description>
			<content:encoded><![CDATA[<p>I opened a <a href="http://twitter.com/pyconit">Twitter account</a> for the PyCon Italy conference. I will try to keep updated as soon as things come up and the conference starts on Friday.</p>

<p><a href="http://twitter.com/pyconit">http://twitter.com/pyconit</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=Ls9dzh"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=Ls9dzh" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=GFrxzh"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=GFrxzh" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/285324091" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/05/07/twitter-page-for-pycon-italy/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F05%2F07%2Ftwitter-page-for-pycon-italy%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/05/07/twitter-page-for-pycon-italy/</feedburner:origLink></item>
		<item>
		<title>share11 with Google AppEngine</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/269949021/</link>
		<comments>http://www.oluyede.org/blog/2008/04/14/share11-with-google-appengine/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 11:19:08 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Django]]></category>

		<category><![CDATA[googleappengine]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=359</guid>
		<description><![CDATA[While I was boring myself to death last weekend and while everybody was talking about it I came up with a sample application.

Now I can talk about Google AppEngine as well  

It is simply a pastebin using the DataStore API, the webapp framework, the Users API, pygments and Django templates.

It is heavily inspired by [...]]]></description>
			<content:encoded><![CDATA[<p>While I was boring myself to death last weekend and while <a href="http://http//technorati.com/search/google+appengine">everybody</a> was talking about it I came up with a sample <a href="http://share11.appspot.com">application</a>.</p>

<p>Now I can talk about Google AppEngine as well <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>It is simply a pastebin using the DataStore API, the webapp framework, the Users API, pygments and Django templates.</p>

<p>It is heavily inspired by <a href="http://dpaste.com">http://dpaste.com</a></p>

<p><a href="http://share11.appspot.com">http://share11.appspot.com</a></p>

<p>The great thing? It took me less than an afternoon (mostly reading the framework docs) and it is ~200 LOC. Even greater? One shell command to upload and deploy <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=hwn7yMg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=hwn7yMg" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=o8VHKBg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=o8VHKBg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/269949021" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/04/14/share11-with-google-appengine/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F04%2F14%2Fshare11-with-google-appengine%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/04/14/share11-with-google-appengine/</feedburner:origLink></item>
		<item>
		<title>PyCon Due schedule updates</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/267203023/</link>
		<comments>http://www.oluyede.org/blog/2008/04/09/pycon-due-schedule-updates/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 19:10:07 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[pycon]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=357</guid>
		<description><![CDATA[We had to make some schedule updates for the conference.

The savory new flavor of Py2.6 and Py3.0 is the title of the second day&#8217;s keynote. Who&#8217;s the speaker? Raymond Hettinger  

The talk about callbacks and Python patterns have been replaced by a talk about the now utterly famous Google AppEngine.

The speakers of the PyPy [...]]]></description>
			<content:encoded><![CDATA[<p>We had to make some schedule updates for the conference.</p>

<p><a href="http://www.pycon.it/pycon2/schedule/talk/the-savory-new-flavor-of-py26-and-py30">The savory new flavor of Py2.6 and Py3.0</a> is the title of the second day&#8217;s keynote. Who&#8217;s the speaker? Raymond Hettinger <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>The talk about callbacks and Python patterns have been replaced by a <a href="http://www.pycon.it/pycon2/schedule/talk/google-app-engine">talk</a> about the now utterly famous Google AppEngine.</p>

<p><span style="text-decoration: line-through;">The speakers of the PyPy talk are Antonio Cuni <strong>and</strong> Samuele Pedroni.</span></p>

<p>The title of Stallman&#8217;s keynote is <a href="http://www.pycon.it/pycon2/schedule/talk/free-software-in-ethics-and-in-practice">Free Software in ethics and in practice</a>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=cDFmJQg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=cDFmJQg" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=iw3PNOg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=iw3PNOg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/267203023" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/04/09/pycon-due-schedule-updates/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F04%2F09%2Fpycon-due-schedule-updates%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/04/09/pycon-due-schedule-updates/</feedburner:origLink></item>
		<item>
		<title>PyCon Due schedule is out</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/266878827/</link>
		<comments>http://www.oluyede.org/blog/2008/04/09/pycon-due-schedule-is-out/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 08:30:08 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[pycon]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=356</guid>
		<description><![CDATA[UPDATE: Raymond Hettinger will hold the keynote of the second day!

PyCon Due is definitely taking shape.

The conference will take place on a three day span.

The first day venue (free of any kind of charge) will be Palazzo Vecchio, in Florence. The conference will be introduced by the spokeswoman of Arts of the city. The opening [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: </strong>Raymond Hettinger will hold the <a href="http://www.pycon.it/pycon2/schedule/talk/the-savory-new-flavor-of-py26-and-py30">keynote of the second day</a>!</p>

<p>PyCon Due is <a href="http://www.pycon.it/pycon2/schedule">definitely taking shape</a>.</p>

<p>The conference will take place on a three day span.</p>

<p>The first day venue (free of any kind of charge) will be <a href="http://en.wikipedia.org/wiki/Palazzo_Vecchio">Palazzo Vecchio</a>, in Florence. The conference will be introduced by the spokeswoman of Arts of the city. The opening keynote will be given by Richard Stallman, a person who needs no introduction in the software world.</p>

<p>After that, which is definitely important, we plan to go out and eat all together at a restaurant. Social life is equally important <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>The actual conference will begin the next day, the 10th of May, divided in three parallels track: a tutorial track, an introduction one and one based on experiences and real life usage of the language.</p>

<p>We&#8217;ll have talks about Python for beginners, various incarnations of Python, Plone, information retrieval, PyQt, nginx and WSGI, Cython, advanced uses of Django, PyMaemo, Unicode, PyPy, Zope 3 and more on that day. There will be also a Skype sponsored talk about <a href="https://developer.skype.com/wiki/Skype4Py">Skype4Py</a>.</p>

<p>The second day will be full of talks about profiling and debugging, SQLAlchemy, Django again, callbacks and patterns, map sharing, concurrency, Twisted Matrix, IronPython, Ajax, compilers in Python, the <a href="https://hosted.fedoraproject.org/func/">Fedora Unified Network Controller</a>, FlyPDF and component architectures and more.</p>

<p>As you can imagine will be a tough three days conference, one an Italian (Python) developer should not miss in my opinion.</p>

<p>A lot of well known speakers: Alex Martelli (another who needs no introduction), Federico di Gregorio (author of psycopg2), <span>Arkadiusz Wahlig (author of Skype4Py), Manlio Perillo (of nginx&#8217;s mod_wsgi fame), Antonio Cuni (from the PyPy team), Giovanni Bajo (mantainer of PyInstaller and of GCC fame), Brian Fitzpatrick (Subversion anyone?), Menno Smits (from the <a href="http://www.resolversystems.com/">Resolver Systems</a> team), Michele Simionato (of metaclasses, decorators and <a href="http://www.python.org/download/releases/2.3/mro/">mro</a> fame) and more.</span></p>

<p>As part of the board of the conference I&#8217;m a little biased by I&#8217;m really looking forward for this one <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<p>See you there!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=iYiR6Zg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=iYiR6Zg" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=0P2yyUg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=0P2yyUg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/266878827" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/04/09/pycon-due-schedule-is-out/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F04%2F09%2Fpycon-due-schedule-is-out%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/04/09/pycon-due-schedule-is-out/</feedburner:origLink></item>
		<item>
		<title>PyCon Due is coming</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/264193684/</link>
		<comments>http://www.oluyede.org/blog/2008/04/04/pycon-due-is-coming/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 20:24:02 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[pycon]]></category>

		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/?p=355</guid>
		<description><![CDATA[UPDATE: I forgot to say that there will be simultaneous translation for non-italian speakers and attendants.

PyCon Due Italy is coming, here the press release (in Italian):


Firenze, 27 Marzo 2008: Sono finalmente aperte le iscrizioni a PyCon Due, la seconda  conferenza italiana dedicata al linguaggio di programmazione Python, che si terrà a Firenze il 9, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE:</strong> I forgot to say that there will be simultaneous translation for non-italian speakers and attendants.</p>

<p>PyCon Due Italy is coming, here the press release (in Italian):</p>

<blockquote>
<p class="line867"><em>Firenze, 27 Marzo 2008</em>: Sono finalmente <strong>aperte le iscrizioni a <a class="http" href="http://www.pycon.it">PyCon Due</a></strong>, la seconda  conferenza italiana dedicata al linguaggio di programmazione <a class="http" href="http://www.python.org">Python</a>, che si terrà a Firenze il 9, 10 e 11 Maggio 2008.</p>
<p class="line862">Dopo il largo successo di pubblico e critica ottenuto da <a class="nonexistent" href="http://www.neropercaso.it/PyCon">PyCon</a> Uno l&#8217;anno scorso, l&#8217;Associazione di Promozione Sociale &#8220;Python Italia&#8221; organizza quest&#8217;anno un evento ancora più ambizioso. Sono attesi infatti <strong>più di 300 tra professionisti, studenti e ricercatori</strong>, per una tre giorni intensa di appuntamenti e interventi imperdibili.</p>
<p class="line874">L&#8217;evento di apertura si svolgerà Venerdì 9 Maggio alle ore 15:00 nel prestigioso <a class="http" href="http://it.wikipedia.org/wiki/Salone_dei_Cinquecento">Salone De&#8217; Cinquecento</a> in Palazzo Vecchio dove, dopo il saluto da parte di Lucia De Siervo (Assessore all&#8217;Informatizzazione del Comune di Firenze, che ha donato all&#8217;evento il suo Patrocinio), <strong>Richard Stallman</strong> (fondatore del movimento del Free Software, inventore della licenza GPL e ideatore del progetto GNU) terrà un keynote sul tema &#8220;Free Software e Free Ethics&#8221;. Questo evento di apertura è ad ingresso libero (fino ad esaurimento posti, ma con priorità a chi è registrato al PyCon).</p>
<p class="line862">In seguito, nelle giornate di Sabato 10 e Domenica 11, all&#8217;<a class="http" href="http://www.auditoriumalduomo.com/">Auditorium Al Duomo</a>, si terranno numerose conferenze dedicate al linguaggo Python, su tre track parallele. Parteciperanno speaker internazionali di fama mondiale come <a class="http" href="http://en.wikipedia.org/wiki/Alex_Martelli">Alex Martelli</a>, Samuele Pedroni,  Brian Fitzpatrick, e molti altri. Sono previsti anche interventi dedicati a programmatori che <strong>si  avvicinano al linguaggio per la prima volta</strong>.</p>
<p class="line862">Inoltre, sono previste sessioni speciali come la <strong>sessione di recruiting</strong> (dedicate ai programmatori in cerca di  nuova occupazione, e alla quale parteciperanno le aziende con posizioni lavorative aperte), momenti di svago e relax  serale, e l&#8217;estrazione di regali offerti dagli sponsor (che includono aziende di caratura internazionale come Skype e Google).</p>
<p class="line862">Per maggiori informazioni, potete visitare il <a class="http" href="http://www.pycon.it">sito Internet ufficiale</a> dedicato all&#8217;evento.  Registrandosi in anticipo, inoltre, sono previsti forti sconti sul biglietto d&#8217;ingresso.</p>
</blockquote>

<p>If you are at least midly interested in the Python word, come!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=BaEoqAg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=BaEoqAg" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=L1AQMMg"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=L1AQMMg" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/264193684" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/04/04/pycon-due-is-coming/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F04%2F04%2Fpycon-due-is-coming%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/04/04/pycon-due-is-coming/</feedburner:origLink></item>
		<item>
		<title>If XML-RPC is really better than REST, it’s not for these reasons.</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/257066742/</link>
		<comments>http://www.oluyede.org/blog/2008/03/24/if-xml-rpc-is-really-better-than-rest-its-not-for-there-reasons/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 14:42:03 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[HTTP]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/2008/03/24/if-xml-rpc-is-really-better-than-rest-its-not-for-there-reasons/</guid>
		<description><![CDATA[Dave Benjamin summarized on his blog 10 reasons why XML-RPC should be better than REST but I think he completely missed the point about REST APIs. Let&#8217;s see:

1 - Standard, cross-language, typeful serialization of data

REST is definitely standard and cross-language. Regarding serialization, you can transfer what you want where you want but if your goal [...]]]></description>
			<content:encoded><![CDATA[<p>Dave Benjamin summarized on his blog <a href="http://ramenlabs.com/2008/02/17/ten-things-that-xml-rpc-does-that-rest-leaves-unspecified/">10 reasons why XML-RPC should be better than REST</a> but I think he completely missed the point about REST APIs. Let&#8217;s see:</p>

<blockquote>1 - Standard, cross-language, typeful serialization of data</blockquote>

<p>REST is <a href="http://www.w3.org/Protocols/rfc2616/rfc2616.html">definitely standard</a> and cross-language. Regarding serialization, you can transfer what you want where you want but if your goal is persisting to make a local resemblance of what you have remotely, I think that&#8217;s bad. What we, as developers, really care is having the possibility to use a service remotely with an eye on scalability and transparence. Hence, HTTP <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<blockquote>2 - User-defined error codes and messages</blockquote>

<p>Nobody forbids anyone to invent your own headers and place whatever meaning you want upon them. With HTTP you can surely do that. Even <a href="http://www.webdav.org/specs/rfc2518.html">whole extensions</a> have been written.</p>

<blockquote>3 - “Boxcarring” of requests to reduce overhead</blockquote>

<p>Box carring is not really an advantage, there are <a href="http://www.mnot.net/cache_docs/">other ways</a> to reduce overhead. See also <a href="http://www.webdav.org/specs/rfc2518.html#STATUS_207">207 multi status</a></p>

<blockquote>4 - Serialization of binary content</blockquote>

<p>Who said REST protocols do not support binary data? You can send whatever you want from the client to server, place the right content type and you&#8217;re done. See also <a href="http://bitworking.org/projects/atom/rfc5023.html#media-link-entries">media resources</a> in the Atom Publishing Protocol.</p>

<blockquote>5 - Serialization of date-time values</blockquote>

<p>Do I really have to answer that?</p>

<blockquote>6 - Standardized parameter passing</blockquote>

<p>And what if I want to pass a parameter that&#8217;s not on the list of the allowed types in the specification? Remember, SOAP has born also to address some of the limitations of XML-RPC.</p>

<blockquote>7 - Introspection allowing for straightforward code generation</blockquote>

<p>Let me say one thing once and for all. Code generation for this purposes is bad, and almost useless (if you are used to highly dynamic languages). Anyway, REST through hypertext is implicitly introspection enabled. Also, documentation of APIs is there for us <img src='http://www.oluyede.org/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>

<blockquote>8 - High-level APIs for just about every language</blockquote>

<p>I think there&#8217;s no need to say that each and every language has some sort of HTTP client.</p>

<blockquote>9 - No manual parsing of XML, ever</blockquote>

<p>This point does not really make sense to me. If one XML-RPC method does return XML as content, you have to parse it because is part of the application domain. The same for SOAP or REST. If, as Dave mentioned, the language has some sort of high-level API for the protocol you don&#8217;t have to parse what&#8217;s on the wire manually: no manual parsing of XML-RPC responses, or SOAP envelopes or HTTP responses.</p>

<blockquote>10 - Only three lines to call a function in Python and several other languages</blockquote>

<p>This is really pointless. Using a REST API from <a href="http://code.google.com/p/httplib2/wiki/Examples">httplib2</a> or <a href="http://microapps.sourceforge.net/restclient/">restclient</a> has the same brevity.</p>

<p>I think Dave did not get REST at all, his conclusion speaks for him:</p>

<blockquote>Not that the REST doesn’t have its benefits, but someone ought to be saying this. XML-RPC isn’t complicated like SOAP, it runs just about everywhere, and it lets you get on with your work rather than arguing about semicolons versus slashes or XML versus JSON or countless other things. Besides, when your goal is to support as many languages as possible, you want to minimize the amount of code you write for each language. As far as I’ve seen, nothing else accomplishes literally no-code binding like XML-RPC.</blockquote>

<p>I suggest reading <a href="http://www.crummy.com/writing/RESTful-Web-Services/">RESTful Web Services</a>, it&#8217;s really a good book. I also suggest reading the <a href="http://www.infoq.com/articles/tilkov-rest-doubts">latest article</a> wrote by <a href="http://www.innoq.com/blog/st/">Stefan Tilkov</a> addressing the most popular REST doubts.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=n2CX0Of"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=n2CX0Of" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=0FodLLf"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=0FodLLf" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/257066742" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2008/03/24/if-xml-rpc-is-really-better-than-rest-its-not-for-there-reasons/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2008%2F03%2F24%2Fif-xml-rpc-is-really-better-than-rest-its-not-for-there-reasons%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2008/03/24/if-xml-rpc-is-really-better-than-rest-its-not-for-there-reasons/</feedburner:origLink></item>
		<item>
		<title>Updates from Python SVN, Part 19</title>
		<link>http://feeds.feedburner.com/~r/ASongForTheLovers/~3/207040331/</link>
		<comments>http://www.oluyede.org/blog/2007/12/27/updates-from-python-svn-part-19/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 14:21:37 +0000</pubDate>
		<dc:creator>Lawrence</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Python]]></category>

		<category><![CDATA[Python SVN]]></category>

		<guid isPermaLink="false">http://www.oluyede.org/blog/2007/12/27/updates-from-python-svn-part-19/</guid>
		<description><![CDATA[Here we are with another update from Python 2.x SVN.


Added os.O_NOATIME constant. It serves the purpose to not update the access time within read operations.
Added os.fchmod() and os.fchown().
The new module has been deprecated. Use types instead.
sys.py3kwarning flag has been exposed. True when python is started with -3 flag on command line. Also warning.warnpy3k() has been [...]]]></description>
			<content:encoded><![CDATA[<p>Here we are with another update from Python 2.x SVN.</p>

<ul>
<li><p>Added <a href="http://docs.python.org/dev/library/os.html#os.O_NOATIME">os.O_NOATIME</a> constant. It serves the purpose to not update the <em>access time</em> within read operations.</p></li>
<li><p>Added <a href="http://docs.python.org/dev/library/os.html#os.fchmod">os.fchmod()</a> and <a href="http://docs.python.org/dev/library/os.html#os.fchown">os.fchown()</a>.</p></li>
<li><p>The <a href="http://docs.python.org/dev/library/new.html">new</a> module has been deprecated. Use <a href="http://docs.python.org/dev/library/types.html">types</a> instead.</p></li>
<li><p><a href="http://docs.python.org/dev/library/sys.html#sys.py3kwarning">sys.py3kwarning</a> flag has been exposed. True when python is started with <em>-3</em> flag on command line. Also <a href="http://docs.python.org/dev/library/warnings.html#warnings.warnpy3k">warning.warnpy3k()</a> has been added to help the transition.</p></li>
<li><p>Added <a href="http://docs.python.org/dev/c-api/concrete.html#PyFloat_GetMax">PyFloat_GetMax</a>, <a href="http://docs.python.org/dev/c-api/concrete.html#PyFloat_GetMin">PyFloat_GetMin</a>, <a href="http://docs.python.org/dev/c-api/concrete.html#PyFloat_GetInfo">PyFloat_GetInfo</a> to the C API and <a href="http://docs.python.org/dev/library/sys.html#sys.float_info">float_info</a> dictionary to the <a href="http://docs.python.org/dev/library/sys.html">sys</a> module which contains information about the internal floating point type.</p></li>
<li><p>Added test suite for the <a href="http://docs.python.org/dev/library/cmd.html">cmd</a> module.</p></li>
<li><p>Added <a href="http://docs.python.org/dev/using/windows.html">Python on Windows</a> documentation.</p></li>
<li><p>Implemented <a href="http://www.python.org/dev/peps/pep-0366/">PEP 366</a> (Main module explicit relative imports).</p></li>
<li><p>Support loading pickles of random.Random objects created on 32-bit systems on 64-bit systems, and vice versa. As a consequence of the change, Random pickles created by Python 2.6 cannot be loaded in Python 2.5.</p></li>
<li><p>Changed GeneratorExit&#8217;s base class <a href="http://bugs.python.org/issue1537">from Exception to BaseException</a>.</p></li>
<li><p><a href="http://docs.python.org/dev/library/os.html#os.access">os.access</a> now always returns True on Windows for any existing directory since there are no read only directories on Windows.</p></li>
<li><p>Added <a href="http://docs.python.org/dev/library/msvcrt.html#msvcrt.getwch">msvcrt.getwch()</a>, <a href="http://docs.python.org/dev/library/msvcrt.html#msvcrt.getwche">msvcrt.getwche()</a>, <a href="http://docs.python.org/dev/library/msvcrt.html#msvcrt.putwch">msvcrt.putwch()</a>, <a href="http://docs.python.org/dev/library/msvcrt.html#msvcrt.ungetwch">msvcrt.ungetwch()</a> to handle wide chars.</p></li>
<li><p>namedtuple.<strong>asdict</strong> and namedtuple.<strong>replace</strong> are now <a href="http://docs.python.org/dev/library/collections.html#collections.somenamedtuple._asdict">namedtuple._asdict()</a> and <a href="http://docs.python.org/dev/library/collections.html#collections.somenamedtuple._replace">namedtuple._replace()</a></p></li>
<li><p>Dictionary construction had a speed-up of about 10%. There is a new opcode, <em>STORE_MAP</em> that saves the compiler from awkward stack manipulations and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem. From the log message:</p></li>
</ul>

<pre>
Old disassembly:
              0 BUILD_MAP                0
              3 DUP_TOP             
              4 LOAD_CONST               1 (1)
              7 ROT_TWO             
              8 LOAD_CONST               2 ('x')
             11 STORE_SUBSCR        
             12 DUP_TOP             
             13 LOAD_CONST               3 (2)
             16 ROT_TWO             
             17 LOAD_CONST               4 ('y')
             20 STORE_SUBSCR 

New disassembly:
              0 BUILD_MAP                0
              3 LOAD_CONST               1 (1)    
              6 LOAD_CONST               2 ('x')
              9 STORE_MAP                
             10 LOAD_CONST               3 (2)  
             13 LOAD_CONST               4 ('y')
             16 STORE_MAP
</pre>

<ul>
<li><p>Another optimization has been added: <a href="http://docs.python.org/dev/library/dis.html#dis.BUILD_MAP">BUILD_MAP</a> now has a meaning. It&#8217;s the estimated size of the dictionary. Allows dictionaries to be pre-sized (upto 255 elements) saving time lost to re-sizes with their attendant mallocs and re-insertions. Has zero effect on small dictionaries (5 elements or fewer), a slight benefit for dicts upto 22 elements (because they had to resize once anyway), and more benefit for dicts upto 255 elements (saving multiple resizes during the build-up and reducing the number of collisions on the first insertions). Beyond 255 elements, there is no addional benefit.</p></li>
<li><p>Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for compatibility are available.</p></li>
<li><p>Added <a href="http://docs.python.org/dev/library/signal.html#signal.set_wakeup_fd">signal.set_wakeup_fd()</a>. There is a correspondent C API as well:  <a href="http://docs.python.org/dev/c-api/exceptions.html#PySignal_SetWakeupFd">PySignal_SetWakeupFd</a>.</p></li>
<li><p>Slightly change in __ hash __ behavior and rich comparison: __ hash __ can be inherited when one __ lt __, __ le __, __ gt __, __ ge __ are overridden, as long as __ eq __ and __ ne __ aren&#8217;t.</p></li>
<li><p>Improved performance of built-in any()/all() by avoiding PyIter_Next().</p></li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=IHpp5qc"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=IHpp5qc" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/ASongForTheLovers?a=0RGvflc"><img src="http://feeds.feedburner.com/~f/ASongForTheLovers?i=0RGvflc" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/ASongForTheLovers/~4/207040331" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.oluyede.org/blog/2007/12/27/updates-from-python-svn-part-19/feed/</wfw:commentRss>
		<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetItemData?uri=ASongForTheLovers&amp;itemurl=http%3A%2F%2Fwww.oluyede.org%2Fblog%2F2007%2F12%2F27%2Fupdates-from-python-svn-part-19%2F</feedburner:awareness><feedburner:origLink>http://www.oluyede.org/blog/2007/12/27/updates-from-python-svn-part-19/</feedburner:origLink></item>
	<feedburner:awareness>http://api.feedburner.com/awareness/1.0/GetFeedData?uri=ASongForTheLovers</feedburner:awareness></channel>
</rss>
