<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>jadecell.org:~$ ./blogStart.sh &#187; Python</title>
	<atom:link href="http://blog.jadecell.org/wp/category/programming/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jadecell.org/wp</link>
	<description>Experiences in *nix &#038; Tech</description>
	<lastBuildDate>Wed, 19 May 2010 00:01:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.5.3" -->
	<copyright>Copyright &#xA9; 2010 jadecell.org:~$ ./blogStart.sh </copyright>
	<managingEditor>admin@blog.jadecell.org</managingEditor>
	<webMaster>admin@blog.jadecell.org</webMaster>
	<category>posts</category>
	<image>
		<url>http://blog.jadecell.org/wp/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>jadecell.org:~$ ./blogStart.sh &#187; Python</title>
		<link>http://blog.jadecell.org/wp</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle></itunes:subtitle>
	<itunes:summary>Experiences in *nix &#38; Tech</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Society &amp; Culture" />
	<itunes:author></itunes:author>
	<itunes:owner>
		<itunes:name></itunes:name>
		<itunes:email>admin@blog.jadecell.org</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://blog.jadecell.org/wp/wp-content/plugins/podpress/images/powered_by_podpress_large.jpg" />
		<item>
		<title>myPyTunes v0.2</title>
		<link>http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/</link>
		<comments>http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 06:36:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[myPyTunes]]></category>

		<guid isPermaLink="false">http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/</guid>
		<description><![CDATA[I&#8217;ve updated and posted the myPyTunes script on Assembla using its Wiki/Trac/SVN project capabilities. I could put it on Google Code, but I figure I try Assembla out since somebody else recommended this to me before. Assembla maybe a bit of fluff, but I&#8217;ll give it a whirl for now. myPyTunes has been recoded and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated and posted the myPyTunes script on <a href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Fzc2VtYmxhLmNvbQ==" target=\"_blank\">Assembla</a> using its Wiki/Trac/SVN project capabilities. I could put it on Google Code, but I figure I try Assembla out since somebody else recommended this to me before. Assembla maybe a bit of fluff, but I&#8217;ll give it a whirl for now.</p>
<p>myPyTunes has been recoded and I&#8217;m planning to classify (OOP) it for the next update. Another step will be to make it a fully integrated web application with server so it&#8217;s completely portable. In due time I guess, but until then, here is the link to the Main Website and SVN</p>
<p><a href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5hc3NlbWJsYS5jb20vd2lraS9zaG93L215cHl0dW5lcw==" target=\"_blank\">http://www.assembla.com/wiki/show/mypytunes </a></p>
<p><map name='google_ad_map_51_03357ac322143b8f'>
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ltYWdlYWRzLmdvb2dsZWFkc2VydmljZXMuY29tL3BhZ2VhZC9pbWdjbGljay81MT9wb3M9MA==" coords='1,2,367,28' />
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NlcnZpY2VzLmdvb2dsZS5jb20vZmVlZGJhY2svYWJn" coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_51_03357ac322143b8f' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=51&amp;url= http%3A%2F%2Fblog.jadecell.org%2Fwp%2F2008%2F04%2F28%2Fmypytunes-v02%2F' /></p> <img src="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=51" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; admin for <a href="http://blog.jadecell.org/wp">jadecell.org:~$ ./blogStart.sh</a>, 2008. |
<a href="http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/">Permalink</a> |
<a href="http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/&amp;title=myPyTunes v0.2">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jadecell.org/wp/2008/04/28/mypytunes-v02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>myPyTunes: iTunes from the Terminal in Python</title>
		<link>http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/</link>
		<comments>http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 21:19:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[myPyTunes]]></category>

		<guid isPermaLink="false">http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/</guid>
		<description><![CDATA[Inspired by the Controlling iTunes from the Terminal article explaining a bash shell command line script to (as the title says) control iTunes from the terminal. I liked this, but I felt I needed a bit more flexibility (meaning I want it coded in something i know better), and I really like Python (especially when [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by the <a href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5tYWNvc3hoaW50cy5jb20vYXJ0aWNsZS5waHA/c3Rvcnk9MjAwMTExMDgyMTE4MDI4MzA=" target=\"_blank\">Controlling iTunes from the Terminal</a> article explaining a bash shell command line script to (as the title says) control iTunes from the terminal. I liked this, but I felt I needed a bit more flexibility (meaning I want it coded in something i know better), and I really like Python (especially when i decide to classify this script), so I decided to port it over to Python.</p>
<p>I found this useful to have installed on the Mac Mini sitting on a desk while i was across the room on my Powerbook. Very handy since I didn&#8217;t want to have to get up every time I wanted to change the song, or pause it when the phone rang, etc.</p>
<p>So far its a pretty clean traslation over with a few modified functions, and a few functions I&#8217;ve thrown in from other posts I had seen, or functions I feel would be cool to be added.</p>
<p>I&#8217;ve only tested this on OSX 10.4.11 &#8211; iTunes 7.6, so even though I believe it should work on  other versions of iTunes/OSX, don&#8217;t take my word for it, but please let me know if you do run into any problems with it.</p>
<p>Right now i&#8217;ll upload the file along with this blog, but i&#8217;ll be sure to use a versioning tool as i make updates.</p>
<p>Download myPyTunes <a href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuamFkZWNlbGwub3JnL3dwL2ZpbGVzL2l0dW5lcw==" target=\"_blank\">here</a> &#8211; Right click the link and choose &#8220;Save As..&#8221;</p>
<p>Here is the basic help menu when you type in &#8220;itunes -h&#8221;:</p>
<blockquote><p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
iTunes Command Line Interface<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Usage: /usr/bin/itunes &lt;option&gt;<br />
Options:<br />
status        = Shows iTunes&#8217; status, current artist, and track.<br />
play          = Start playing iTunes.<br />
stop          = Stop iTunes<br />
pause         = Pause iTunes.<br />
playpause     = Play/Pause iTunes.<br />
next          = Go to the next track.<br />
prev          = Go to the previous track.<br />
mute          = Mute iTunes&#8217; volume.<br />
unmute        = Unmute iTunes&#8217; volume.<br />
vol up        = Increase iTunes&#8217; volume by 10%<br />
vol down      = Increase iTunes&#8217; volume by 10%<br />
vol #         = Set iTunes&#8217; volume to # [0-100]<br />
quit          = Quit iTunes<br />
launch        = Launch iTunes<br />
playlist @    = Play iTunes&#8217; playlist named @&#8221;<br />
list          = list playlists.<br />
shuf          = turn on shuffle playlist<br />
noshuf        = turn off shuffle playlist<br />
ostream       = open stream<br />
help          = what&#8217;s showing now<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p></blockquote>
<p><map name='google_ad_map_44_03357ac322143b8f'>
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ltYWdlYWRzLmdvb2dsZWFkc2VydmljZXMuY29tL3BhZ2VhZC9pbWdjbGljay80ND9wb3M9MA==" coords='1,2,367,28' />
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NlcnZpY2VzLmdvb2dsZS5jb20vZmVlZGJhY2svYWJn" coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_44_03357ac322143b8f' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=44&amp;url= http%3A%2F%2Fblog.jadecell.org%2Fwp%2F2008%2F02%2F19%2Fmypytunes-itunes-from-the-terminal-in-python%2F' /></p> <img src="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=44" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; admin for <a href="http://blog.jadecell.org/wp">jadecell.org:~$ ./blogStart.sh</a>, 2008. |
<a href="http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/">Permalink</a> |
<a href="http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/&amp;title=myPyTunes: iTunes from the Terminal in Python">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jadecell.org/wp/2008/02/19/mypytunes-itunes-from-the-terminal-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python: where is the switch/case?</title>
		<link>http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/</link>
		<comments>http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 18:02:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/</guid>
		<description><![CDATA[i was writing up some code in python and had several if/else like statements that i figured would require a better syntax and figured that the switch/case method would possibly be a better way to handle it. lo and behold, after research&#8230;there&#8217;s no switch/case like statement!! i found several ways of solving the issue, which [...]]]></description>
			<content:encoded><![CDATA[<p>i was writing up some code in python and had several if/else like statements that i figured would require a better syntax and figured that the switch/case method would possibly be a better way to handle it. lo and behold, after research&#8230;there&#8217;s no switch/case like statement!!</p>
<p>i found several ways of solving the issue, which seem to be rather interesting. many people thought that the if/else was probably the best way to go&#8230;of course we can&#8217;t have that, and continued to find some people stating to use the dict like  command to determine your call. for example:</p>
<blockquote><p>def performAction1():<br />
&nbsp;&nbsp;&nbsp;print &#8220;some crap&#8221;<br />
def performAction2():<br />
&nbsp;&nbsp;&nbsp;print &#8220;some more crap&#8221;<br />
{<br />
&nbsp;&nbsp;&nbsp;&#8221;action1&#8243;: performAction1,<br />
&nbsp;&nbsp;&nbsp;&#8221;action2&#8243;: performAction2,<br />
&nbsp;&nbsp;&nbsp;&#8230;etc&#8230;<br />
}[actionToPerformString]()</p></blockquote>
<p>this seemed to be a good way to do it, but something about the actionToPerformString trailing like that bothered me, so there was also this method which seemed to be more visually pleasing to me:</p>
<blockquote><p>def defaultActionToPerform():<br />
&nbsp;&nbsp;&nbsp;print &#8220;default crap&#8221;<br />
action = {<br />
&nbsp;&nbsp;&nbsp;&#8221;action1&#8243;: performAction1,<br />
&nbsp;&nbsp;&nbsp;&#8221;action2&#8243;: performAction2,<br />
&nbsp;&nbsp;&nbsp;&#8230;etc&#8230;<br />
}<br />
action.get(actionToPerformString, defaultActionToPerform)()
</p></blockquote>
<p>as you can see, it also allowed for a default function to be called, plus it reall just does look cleaner. if anybody has a more elegant solution, please feel free to comment.</p>
<p><map name='google_ad_map_42_03357ac322143b8f'>
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ltYWdlYWRzLmdvb2dsZWFkc2VydmljZXMuY29tL3BhZ2VhZC9pbWdjbGljay80Mj9wb3M9MA==" coords='1,2,367,28' />
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NlcnZpY2VzLmdvb2dsZS5jb20vZmVlZGJhY2svYWJn" coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_42_03357ac322143b8f' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=42&amp;url= http%3A%2F%2Fblog.jadecell.org%2Fwp%2F2008%2F02%2F08%2Fpython-where-is-the-switchcase%2F' /></p> <img src="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=42" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; admin for <a href="http://blog.jadecell.org/wp">jadecell.org:~$ ./blogStart.sh</a>, 2008. |
<a href="http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/">Permalink</a> |
<a href="http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/#comments">One comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/&amp;title=Python: where is the switch/case?">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jadecell.org/wp/2008/02/08/python-where-is-the-switchcase/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to remove a non-empty directory tree</title>
		<link>http://blog.jadecell.org/wp/2006/07/18/how-to-remove-a-non-empty-directory-tree/</link>
		<comments>http://blog.jadecell.org/wp/2006/07/18/how-to-remove-a-non-empty-directory-tree/#comments</comments>
		<pubDate>Wed, 19 Jul 2006 03:47:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.jadecell.org/wp/?p=7</guid>
		<description><![CDATA[simple&#8230;i know, but you&#8217;d be surprised how many ppl don&#8217;t know this. Terminal: $ rm -rf directory Python: >>> shutil.rmtree("/some/dir") can definitely come in handy &#169; admin for jadecell.org:~$ ./blogStart.sh, 2006. &#124; Permalink &#124; No comment &#124; Add to del.icio.us Post tags: Feed enhanced by Better Feed from Ozh]]></description>
			<content:encoded><![CDATA[<p>simple&#8230;i know, but you&#8217;d be surprised how many ppl don&#8217;t know this.</p>
<p>Terminal:</p>
<p><code>$ rm -rf <em>directory</em></code></p>
<p>Python:</p>
<p><code>>>> shutil.rmtree("/some/dir")</code></p>
<p>can definitely come in handy</p>
<p><map name='google_ad_map_7_03357ac322143b8f'>
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ltYWdlYWRzLmdvb2dsZWFkc2VydmljZXMuY29tL3BhZ2VhZC9pbWdjbGljay83P3Bvcz0w" coords='1,2,367,28' />
<area shape='rect' href="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NlcnZpY2VzLmdvb2dsZS5jb20vZmVlZGJhY2svYWJn" coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_7_03357ac322143b8f' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=7&amp;url= http%3A%2F%2Fblog.jadecell.org%2Fwp%2F2006%2F07%2F18%2Fhow-to-remove-a-non-empty-directory-tree%2F' /></p> <img src="http://blog.jadecell.org/wp/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=7" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; admin for <a href="http://blog.jadecell.org/wp">jadecell.org:~$ ./blogStart.sh</a>, 2006. |
<a href="http://blog.jadecell.org/wp/2006/07/18/how-to-remove-a-non-empty-directory-tree/">Permalink</a> |
<a href="http://blog.jadecell.org/wp/2006/07/18/how-to-remove-a-non-empty-directory-tree/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://blog.jadecell.org/wp/2006/07/18/how-to-remove-a-non-empty-directory-tree/&amp;title=How to remove a non-empty directory tree">del.icio.us</a>
<br/>
Post tags: <br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jadecell.org/wp/2006/07/18/how-to-remove-a-non-empty-directory-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
