<?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/"
	>

<channel>
	<title>Code-itch &#187; argparse python</title>
	<atom:link href="http://www.code-itch.com/blog/tag/argparse-python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-itch.com/blog</link>
	<description>A non-coders attempts at writing useful code</description>
	<lastBuildDate>Sat, 20 Mar 2010 20:13:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ahh ! for argparse</title>
		<link>http://www.code-itch.com/blog/2009/07/ahh-for-argparse/</link>
		<comments>http://www.code-itch.com/blog/2009/07/ahh-for-argparse/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 15:17:29 +0000</pubDate>
		<dc:creator>harijay</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[argparse python]]></category>

		<guid isPermaLink="false">http://www.code-itch.com/blog/?p=123</guid>
		<description><![CDATA[Its been a while since I blogged . Just a lot happening on the crystallography side of things to allow me the time to blog. I have also been coding a lot lately and have gotten started with some GUI writing in wxpython. This post is about trying to get back into the groove by [...]]]></description>
			<content:encoded><![CDATA[<p>Its been a while since I blogged . Just a lot happening on the crystallography side of things to allow me the time to blog.</p>
<p>I have also been coding a lot lately and have gotten started with some GUI writing in wxpython.</p>
<p>This post is about trying to get back into the groove by telling you about argparse .<a href="http://www.code-itch.com/blog/2009/04/command-line-handling-in-python-with-optparse/"> Having talked about optparse</a> and command line parsing , I heard about argparse thanks to a talk that I caught  by clicking a link on  the<a href="http://us.pycon.org/2009/conference/schedule/"> Pycon2009 master schedule</a> .  This link has all the Pycon 2009 slides and video links in one place &#8211; a great resource.</p>
<p>For those interested in <a href="http://code.google.com/p/argparse/">argparse</a> check out the &#8220;Plenary Evening session &#8221; on Sunday Mar 29th 1.20 pm at PyCon2009 where<a href="http://us.pycon.org/2009/conference/schedule/event/97/"> Steven Bethard talks about argparse.</a><br />
<object width="720" height="510" data="http://blip.tv/play/AfiLMZWmLQ" type="application/x-shockwave-flash"><param name="src" value="http://blip.tv/play/AfiLMZWmLQ" /><param name="allowfullscreen" value="true" /></object></p>
<p>The most important difference between <a href="http://code.google.com/p/argparse/">argparse </a>and optparse is that argparse provides better handling for positional <a href="http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html">arguments in addition to optional arguments</a> . Argparse also provides automatically generated useage information and   takes care of handling cases like when the user forgets to provide any arguments and prints the help information by default.</p>
<p>The key differences are summarized in the <a href="http://argparse.googlecode.com/svn/trunk/doc/argparse-vs-optparse.html">excellent documentation at this URL</a> , so I will not rehash it . But I have happily switched over to argparse from optparse and hope argparse becomes part of the python standard libraries soon.</p>
<p>For <a href="http://github.com/harijay/xtaltools/tree/master">some code examples check out my github repository</a> especially the script <a href="http://github.com/harijay/xtaltools/blob/e683fcef6a5ad7394b87382e58d4dce32a85585b/maskconvert.py">maskconvert.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.code-itch.com/blog/2009/07/ahh-for-argparse/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
