<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Command-line syntax: some basic concepts</title>
	<atom:link href="http://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/feed/" rel="self" type="application/rss+xml" />
	<link>http://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/</link>
	<description>Adventures across space and time with the Python programming language</description>
	<lastBuildDate>Sat, 04 May 2013 20:54:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Terrence Brannon</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/#comment-1362</link>
		<dc:creator><![CDATA[Terrence Brannon]]></dc:creator>
		<pubDate>Wed, 29 Feb 2012 14:31:06 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=532#comment-1362</guid>
		<description><![CDATA[++ on Commando. Very intuitive yet very powerful. Just what a person getting his feet wet in Python needs :)]]></description>
		<content:encoded><![CDATA[<p>++ on Commando. Very intuitive yet very powerful. Just what a person getting his feet wet in Python needs <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mufasa</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/#comment-643</link>
		<dc:creator><![CDATA[Mufasa]]></dc:creator>
		<pubDate>Sun, 06 Feb 2011 14:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=532#comment-643</guid>
		<description><![CDATA[You may be interested in a little Python module I wrote to make handling of command line arguments even easier (open source and free to use) - &lt;a href=&quot;http://freshmeat.net/projects/commando&quot; title=&quot;Commando&quot; rel=&quot;nofollow&quot;&gt;Commando&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>You may be interested in a little Python module I wrote to make handling of command line arguments even easier (open source and free to use) &#8211; <a href="http://freshmeat.net/projects/commando" title="Commando" rel="nofollow">Commando</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/#comment-342</link>
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Mon, 26 Jul 2010 20:59:19 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=532#comment-342</guid>
		<description><![CDATA[Slight correction: Attempting to &quot;hide&quot; a sigil character by quoting its argument doesn&#039;t work, at least not when calling a program from a standard shell.  The quotes are interpreted by the shell, not the program; the program receives a list of arguments, any of which may or may not have whitespace, and any of which may have undergone quote stripping.  The sigil character, in contrast, is interpreted by the program.  Try it:

$ echo &quot;import sys&quot; &gt; quotes.py
$ echo &quot;print(sys.argv)&quot; &gt;&gt; quotes.py
$ python quotes.py -unquoted &quot;-quoted&quot;
[&#039;quotes.py&#039;, &#039;-unquoted&#039;, &#039;-quoted&#039;]

In addition, many modern programs allow keyword arguments to be specified after (or even between) positional arguments, but most still recommend listing positional arguments first.  In practice, the main one I use in the &quot;wrong&quot; place is the -m/--message argument to svn/git/hg/bzr commit; I was routinely annoyed by a version of Mercurial that enforced the convention.  Then there&#039;s `find`...]]></description>
		<content:encoded><![CDATA[<p>Slight correction: Attempting to &#8220;hide&#8221; a sigil character by quoting its argument doesn&#8217;t work, at least not when calling a program from a standard shell.  The quotes are interpreted by the shell, not the program; the program receives a list of arguments, any of which may or may not have whitespace, and any of which may have undergone quote stripping.  The sigil character, in contrast, is interpreted by the program.  Try it:</p>
<p>$ echo &#8220;import sys&#8221; &gt; quotes.py<br />
$ echo &#8220;print(sys.argv)&#8221; &gt;&gt; quotes.py<br />
$ python quotes.py -unquoted &#8220;-quoted&#8221;<br />
['quotes.py', '-unquoted', '-quoted']</p>
<p>In addition, many modern programs allow keyword arguments to be specified after (or even between) positional arguments, but most still recommend listing positional arguments first.  In practice, the main one I use in the &#8220;wrong&#8221; place is the -m/&#8211;message argument to svn/git/hg/bzr commit; I was routinely annoyed by a version of Mercurial that enforced the convention.  Then there&#8217;s `find`&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Goodger</title>
		<link>http://pythonconquerstheuniverse.wordpress.com/2010/07/25/command-line-syntax-some-basic-concepts/#comment-341</link>
		<dc:creator><![CDATA[David Goodger]]></dc:creator>
		<pubDate>Mon, 26 Jul 2010 14:27:56 +0000</pubDate>
		<guid isPermaLink="false">http://pythonconquerstheuniverse.wordpress.com/?p=532#comment-341</guid>
		<description><![CDATA[There is a good discussion of command-line arguments and options in the optparse docs:
http://docs.python.org/dev/library/optparse.html#background

You&#039;re missing one HUGE distinction in your article, which is doing a disservice to your readers. You introduce this new terminology of &quot;keyword arguments&quot;, but omit the common term &quot;command-line OPTIONS&quot;. (I assume you lifted the &quot;keyword arguments&quot; term from the Python programming world; AFAIK it is absent from the command-line lexicon.) Traditionally, command-line arguments like &quot;-v&quot; or &quot;--help&quot; are called &quot;command-line options&quot;, for the simple reason that they&#039;re optional. The command-line libraries I know (getopt &amp; optparse; haven&#039;t used argparse yet) implement options as just that: optional. It is a CONTRADICTION IN TERMS to have &quot;required options&quot; or &quot;mandatory options&quot;. It is considered bad form (and a misuse of such libraries) to require one or more &quot;keyword arguments&quot; on the command line.

Command-line options may have arguments, e.g. &quot;--output myfile.txt&quot; (those that don&#039;t have argument are, as you write, often called &quot;flags&quot; or &quot;switches&quot;). These are called &quot;option arguments&quot;, and they are usually required by the option. In rare cases option arguments themselves are optional, but that introduces an ambiguity to command-line processing: in &quot;-x one two&quot;, is &quot;one&quot; the argument of the &quot;-x&quot; option, or is it the first positional argument? Best to avoid such ambiguity by having different options for the has-argument and no-argument cases.]]></description>
		<content:encoded><![CDATA[<p>There is a good discussion of command-line arguments and options in the optparse docs:<br />
<a href="http://docs.python.org/dev/library/optparse.html#background" rel="nofollow">http://docs.python.org/dev/library/optparse.html#background</a></p>
<p>You&#8217;re missing one HUGE distinction in your article, which is doing a disservice to your readers. You introduce this new terminology of &#8220;keyword arguments&#8221;, but omit the common term &#8220;command-line OPTIONS&#8221;. (I assume you lifted the &#8220;keyword arguments&#8221; term from the Python programming world; AFAIK it is absent from the command-line lexicon.) Traditionally, command-line arguments like &#8220;-v&#8221; or &#8220;&#8211;help&#8221; are called &#8220;command-line options&#8221;, for the simple reason that they&#8217;re optional. The command-line libraries I know (getopt &amp; optparse; haven&#8217;t used argparse yet) implement options as just that: optional. It is a CONTRADICTION IN TERMS to have &#8220;required options&#8221; or &#8220;mandatory options&#8221;. It is considered bad form (and a misuse of such libraries) to require one or more &#8220;keyword arguments&#8221; on the command line.</p>
<p>Command-line options may have arguments, e.g. &#8220;&#8211;output myfile.txt&#8221; (those that don&#8217;t have argument are, as you write, often called &#8220;flags&#8221; or &#8220;switches&#8221;). These are called &#8220;option arguments&#8221;, and they are usually required by the option. In rare cases option arguments themselves are optional, but that introduces an ambiguity to command-line processing: in &#8220;-x one two&#8221;, is &#8220;one&#8221; the argument of the &#8220;-x&#8221; option, or is it the first positional argument? Best to avoid such ambiguity by having different options for the has-argument and no-argument cases.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
