<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: A Missing Battery in Python: a bash &#8220;select&#8221; equivalent</title>
	<atom:link href="http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/</link>
	<description>Made with only the finest 1's and 0's</description>
	<lastBuildDate>Thu, 26 Jan 2012 21:20:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Catherine Devlin</title>
		<link>http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/comment-page-1/#comment-33488</link>
		<dc:creator>Catherine Devlin</dc:creator>
		<pubDate>Tue, 26 Jan 2010 03:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=535#comment-33488</guid>
		<description>Hmm... wonder if I can fit a SELECT into cmd2 in time for PyCon.  (Granted, that still wouldn&#039;t make it an included battery.)</description>
		<content:encoded><![CDATA[<p>Hmm&#8230; wonder if I can fit a SELECT into cmd2 in time for PyCon.  (Granted, that still wouldn&#8217;t make it an included battery.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twitter Trackbacks for A Missing Battery in Python: a bash “select” equivalent &#124; Musings of an Anonymous Geek [protocolostomy.com] on Topsy.com</title>
		<link>http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/comment-page-1/#comment-22394</link>
		<dc:creator>Twitter Trackbacks for A Missing Battery in Python: a bash “select” equivalent &#124; Musings of an Anonymous Geek [protocolostomy.com] on Topsy.com</dc:creator>
		<pubDate>Sun, 30 Aug 2009 12:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=535#comment-22394</guid>
		<description>[...] A Missing Battery in Python: a bash “select” equivalent &#124; Musings of an Anonymous Geek  www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent &#8211; view page &#8211; cached  So, someone showed me a script they were writing in bash. They were doing a lot of manual menu creation, then using read to collect input, and manually &#8212; From the page [...]</description>
		<content:encoded><![CDATA[<p>[...] A Missing Battery in Python: a bash “select” equivalent | Musings of an Anonymous Geek  <a href="http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent" rel="nofollow">http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent</a> &ndash; view page &ndash; cached  So, someone showed me a script they were writing in bash. They were doing a lot of manual menu creation, then using read to collect input, and manually &mdash; From the page [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: m0j0</title>
		<link>http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/comment-page-1/#comment-17151</link>
		<dc:creator>m0j0</dc:creator>
		<pubDate>Fri, 12 Jun 2009 02:21:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=535#comment-17151</guid>
		<description>Done! 

Thanks for pointing out that glaring omission, Michael.</description>
		<content:encoded><![CDATA[<p>Done! </p>
<p>Thanks for pointing out that glaring omission, Michael.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Foord</title>
		<link>http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/comment-page-1/#comment-17128</link>
		<dc:creator>Michael Foord</dc:creator>
		<pubDate>Thu, 11 Jun 2009 19:23:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=535#comment-17128</guid>
		<description>This blog entry would have been greatly improved by explaining the semantics of what select does. :-)</description>
		<content:encoded><![CDATA[<p>This blog entry would have been greatly improved by explaining the semantics of what select does. <img src='http://www.protocolostomy.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathieu Agopian</title>
		<link>http://www.protocolostomy.com/2009/06/03/a-missing-battery-in-python-a-bash-select-equivalent/comment-page-1/#comment-16729</link>
		<dc:creator>Mathieu Agopian</dc:creator>
		<pubDate>Thu, 04 Jun 2009 04:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.protocolostomy.com/?p=535#comment-16729</guid>
		<description>You could go, as Doug said, with enumerate and a tuple:

&gt;&gt;&gt; d = (&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;)
&gt;&gt;&gt; d
(&#039;foo&#039;, &#039;bar&#039;, &#039;baz&#039;)
&gt;&gt;&gt; for i, v in enumerate(d):
...    print i + 1, v
...
1 foo
2 bar
3 baz
&gt;&gt;&gt; d[2 - 1] # -1 because enumerate is 0-indexed and we printed 1-indexed
bar</description>
		<content:encoded><![CDATA[<p>You could go, as Doug said, with enumerate and a tuple:</p>
<p>&gt;&gt;&gt; d = (&#8220;foo&#8221;, &#8220;bar&#8221;, &#8220;baz&#8221;)<br />
&gt;&gt;&gt; d<br />
(&#8216;foo&#8217;, &#8216;bar&#8217;, &#8216;baz&#8217;)<br />
&gt;&gt;&gt; for i, v in enumerate(d):<br />
&#8230;    print i + 1, v<br />
&#8230;<br />
1 foo<br />
2 bar<br />
3 baz<br />
&gt;&gt;&gt; d[2 - 1] # -1 because enumerate is 0-indexed and we printed 1-indexed<br />
bar</p>
]]></content:encoded>
	</item>
</channel>
</rss>

