<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/cmd2-git.git/cmd2.py, branch 0.8.0</title>
<subtitle>github.com: python-cmd2/cmd2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/'/>
<entry>
<title>Fixed issue with automated transcript generation via "history -t"</title>
<updated>2018-01-30T01:23:38+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-30T01:23:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=6d1ce7ae47343251af3db9ddc6fd67f72352a9e7'/>
<id>6d1ce7ae47343251af3db9ddc6fd67f72352a9e7</id>
<content type='text'>
There is now a post-processing step which escapes all "/" characters which transcript testing treats as a regex escape if there isn't a "\" to esape it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is now a post-processing step which escapes all "/" characters which transcript testing treats as a regex escape if there isn't a "\" to esape it.
</pre>
</div>
</content>
</entry>
<entry>
<title>redirect_stderr wasn't added to contextlib until Python 3.5</title>
<updated>2018-01-22T05:33:26+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-22T05:33:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=6c2cdf229dd62a957d7e27533725a9cc013db22e'/>
<id>6c2cdf229dd62a957d7e27533725a9cc013db22e</id>
<content type='text'>
So it turns out that we need contextlib2 for Python 3.4 and earlier.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So it turns out that we need contextlib2 for Python 3.4 and earlier.
</pre>
</div>
</content>
</entry>
<entry>
<title>help command temporarily redirects sys.stdout and sys.stderr to self.stdout for argparse commands</title>
<updated>2018-01-22T05:08:27+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-22T05:08:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=f28c10a50535f753419bd2120ac6cb0bea9f56e2'/>
<id>f28c10a50535f753419bd2120ac6cb0bea9f56e2</id>
<content type='text'>
In order to make "help" behave more consistently for decorated and undecorated commands, argparse output is temporarily redirected to self.stdout.  So doing "help history" is similar to "help load".

However, when using the "-h" with argparse commands without using the "help" command, the output from argparse isn't redirected to self.stdout.  Fixing this would be rather difficult and would essentially involve creating a pyparsing rule to detect it at the parser level.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to make "help" behave more consistently for decorated and undecorated commands, argparse output is temporarily redirected to self.stdout.  So doing "help history" is similar to "help load".

However, when using the "-h" with argparse commands without using the "help" command, the output from argparse isn't redirected to self.stdout.  Fixing this would be rather difficult and would essentially involve creating a pyparsing rule to detect it at the parser level.
</pre>
</div>
</content>
</entry>
<entry>
<title>Renamed @with_argument_parser decorator to @with_argparser</title>
<updated>2018-01-22T03:24:09+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-22T03:24:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=c9f7c012bda012b4df7a8c5e853bd5d3e6d99b1b'/>
<id>c9f7c012bda012b4df7a8c5e853bd5d3e6d99b1b</id>
<content type='text'>
Also:
- Reanamed foo and bar subcommand methods to base_foo and base_bar
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also:
- Reanamed foo and bar subcommand methods to base_foo and base_bar
</pre>
</div>
</content>
</entry>
<entry>
<title>History enhancements</title>
<updated>2018-01-21T01:01:24+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-21T01:01:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=6bc3c7528b02f0160c31eb008f1218ee4c3344bc'/>
<id>6bc3c7528b02f0160c31eb008f1218ee4c3344bc</id>
<content type='text'>
History changes:
- Unknown commands are no longer saved in the history
- history command now has a -t option to generate a transcript based on commands in the history

Also:
- Moved examples transcripts from examples to examples/transcripts
- Added a new transcript for use with the pirate.py example
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
History changes:
- Unknown commands are no longer saved in the history
- history command now has a -t option to generate a transcript based on commands in the history

Also:
- Moved examples transcripts from examples to examples/transcripts
- Added a new transcript for use with the pirate.py example
</pre>
</div>
</content>
</entry>
<entry>
<title>Added unit tests for newly-overridden complete() method</title>
<updated>2018-01-20T23:04:43+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-20T23:04:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=bd948d727e0e13fa5fd77199c06fcd3dfdda9b39'/>
<id>bd948d727e0e13fa5fd77199c06fcd3dfdda9b39</id>
<content type='text'>
Also added a section on Sub-commands to the documentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also added a section on Sub-commands to the documentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added unit tests for sub-commands</title>
<updated>2018-01-20T21:48:52+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-20T21:48:52+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=5550ab73a91d2834e6bda72eb3889998ad59be51'/>
<id>5550ab73a91d2834e6bda72eb3889998ad59be51</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tab-completion of subcommand names is now supported</title>
<updated>2018-01-20T20:48:54+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-20T20:48:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=29ef26875664dfa3d70273b321092a83a68d9966'/>
<id>29ef26875664dfa3d70273b321092a83a68d9966</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added links to docs and examples to CHANGELOG.md</title>
<updated>2018-01-20T18:11:17+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-20T18:11:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=014371fd1353c6f585e7be18bc3a2dc6ef4fd397'/>
<id>014371fd1353c6f585e7be18bc3a2dc6ef4fd397</id>
<content type='text'>
Also bumped version to 0.8.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also bumped version to 0.8.0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Added support for argparse sub-commands when using cmd2 decorators</title>
<updated>2018-01-20T16:54:43+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-20T16:54:43+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=136de7e22fa04ed41fc37b8a6c900cf507db8f26'/>
<id>136de7e22fa04ed41fc37b8a6c900cf507db8f26</id>
<content type='text'>
Modified the do_help() method to behave differently for methods which have been decorated with an argparse ArgumentParser.
This is so that help will properly deal with sub-command help.

Suppose you have a base command "base" which has two sub-commands, "foo" and "bar".  Then "help base" will provide very different help text than "help base foo".

Slightly tweaked the two argparse decorators to set an attribute in the decorated function's dictionary so that the do_help method can know which functions have an ArgumentParser and which do not.

Added a "subcommands.py" example for demonstrating how to create and use subcommands based on argparse and the cmd2 @with_argument_parser decorator.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Modified the do_help() method to behave differently for methods which have been decorated with an argparse ArgumentParser.
This is so that help will properly deal with sub-command help.

Suppose you have a base command "base" which has two sub-commands, "foo" and "bar".  Then "help base" will provide very different help text than "help base foo".

Slightly tweaked the two argparse decorators to set an attribute in the decorated function's dictionary so that the do_help method can know which functions have an ArgumentParser and which do not.

Added a "subcommands.py" example for demonstrating how to create and use subcommands based on argparse and the cmd2 @with_argument_parser decorator.
</pre>
</div>
</content>
</entry>
</feed>
