<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/cmd2-git.git/examples/example.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>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>Changed @with_argument_parser to only pass single argument to commands</title>
<updated>2018-01-15T17:11:12+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-15T17:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=eee2d621abfb3d6455570b540069a4853a68f8c6'/>
<id>eee2d621abfb3d6455570b540069a4853a68f8c6</id>
<content type='text'>
Also added another @with_argparser_and_list decorator that uses argparse.parse_known_args to pass two arguments to a command:  both the argparse output and a list of unknown/unmatched args.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also added another @with_argparser_and_list decorator that uses argparse.parse_known_args to pass two arguments to a command:  both the argparse output and a list of unknown/unmatched args.
</pre>
</div>
</content>
</entry>
<entry>
<title>Made a couple cleanup changes</title>
<updated>2018-01-15T06:34:50+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-15T06:34:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=141d95194b30d959f6c21f4546100551c442b13d'/>
<id>141d95194b30d959f6c21f4546100551c442b13d</id>
<content type='text'>
1) cmd2 no longer imports make_option from optparse
- test files and examples now import this directly
- this helps emphasize that this old optparse methodology of adding options to commands is deprecated

2) All argparsers have been given custom names instead of just "argparser"
- this helps with readability and maintainability, especially with IDE renaming and such
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1) cmd2 no longer imports make_option from optparse
- test files and examples now import this directly
- this helps emphasize that this old optparse methodology of adding options to commands is deprecated

2) All argparsers have been given custom names instead of just "argparser"
- this helps with readability and maintainability, especially with IDE renaming and such
</pre>
</div>
</content>
</entry>
<entry>
<title>switch from optparse to argparse</title>
<updated>2018-01-11T06:18:38+00:00</updated>
<author>
<name>Jared Crapo</name>
<email>jared@kotfu.net</email>
</author>
<published>2018-01-11T06:18: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=f76f43793ea728a57b2e51b0ae245d3abf866512'/>
<id>f76f43793ea728a57b2e51b0ae245d3abf866512</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Made a couple fixes to existing examples</title>
<updated>2017-11-11T17:03:38+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-11-11T17:03: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=dbc9f819182b26d0ae68f55e24467411d5711290'/>
<id>dbc9f819182b26d0ae68f55e24467411d5711290</id>
<content type='text'>
Changes include:
- argparse_example.py modified to do pass all unknown args onto cmd2 and allow arguments at invocation
- example.py comments modified to indicate it is intended to be used with transcript_regext.txt
- exampleSession.txt fixed so it works properly with argparse_example.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes include:
- argparse_example.py modified to do pass all unknown args onto cmd2 and allow arguments at invocation
- example.py comments modified to indicate it is intended to be used with transcript_regext.txt
- exampleSession.txt fixed so it works properly with argparse_example.py
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the same as test_transcription.py</title>
<updated>2017-08-22T02:39:43+00:00</updated>
<author>
<name>Jared Crapo</name>
<email>jared@kotfu.net</email>
</author>
<published>2017-08-22T02:39: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=6f14013a26d2c394d77f6da0682a68947d6dbb05'/>
<id>6f14013a26d2c394d77f6da0682a68947d6dbb05</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Write documentation for revised transcription feature</title>
<updated>2017-08-21T18:27:09+00:00</updated>
<author>
<name>Jared Crapo</name>
<email>jared@kotfu.net</email>
</author>
<published>2017-08-21T18:27: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=1f2fea6c481bdcba526bc10c29edd162cf5212c7'/>
<id>1f2fea6c481bdcba526bc10c29edd162cf5212c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed a few bugs and examples</title>
<updated>2017-07-03T23:56:25+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-07-03T23:56:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=7c17d8bbf006e17f0104b6d9d35fc67ca4f235fd'/>
<id>7c17d8bbf006e17f0104b6d9d35fc67ca4f235fd</id>
<content type='text'>
Bug fixes:
- case_insensitive is no longer a runtime-settable parameter, but it was still listed as such
- Fixed a recursive loop bug when abbreviated commands are enabled and it could get stuck in the editor forever
    - Added additional command abbreviations to the "exclude from history" list
- Fixed argparse_example.py and pirate.py examples

Other changes:
- Organized all attributes used to configure the ParserManager into a single location
- Set the default value of "abbrev" to False (which controls whether or not abbreviated commands are allowed)
    - With good tab-completion of command names, using abbreviated commands isn't a particularly useful feature
    - And it can create problems
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bug fixes:
- case_insensitive is no longer a runtime-settable parameter, but it was still listed as such
- Fixed a recursive loop bug when abbreviated commands are enabled and it could get stuck in the editor forever
    - Added additional command abbreviations to the "exclude from history" list
- Fixed argparse_example.py and pirate.py examples

Other changes:
- Organized all attributes used to configure the ParserManager into a single location
- Set the default value of "abbrev" to False (which controls whether or not abbreviated commands are allowed)
    - With good tab-completion of command names, using abbreviated commands isn't a particularly useful feature
    - And it can create problems
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactored to replace custom StubbornDict with collections.OrderedDict</title>
<updated>2017-06-29T16:47:11+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>tleonhardt@gmail.com</email>
</author>
<published>2017-06-29T16:47:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=d717ea7966574dfec85bcc057f7abe5579c5c121'/>
<id>d717ea7966574dfec85bcc057f7abe5579c5c121</id>
<content type='text'>
The self.settable object is now an OrderedDict instead of a custom StubbornDict.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The self.settable object is now an OrderedDict instead of a custom StubbornDict.
</pre>
</div>
</content>
</entry>
<entry>
<title>Changed default value for USE_ARG_LIST global to True</title>
<updated>2017-06-15T01:37:38+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-06-15T01:37: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=f2cb3a009456ec9115e41720e81ef031ed4eaf46'/>
<id>f2cb3a009456ec9115e41720e81ef031ed4eaf46</id>
<content type='text'>
Now by default all @options commands get passed a list of argument strings instead of a single argument string.

This is a much easier and more robust behavior to deal with.  Additionally, command-line arguments are intelligently separated based on location of quotes to group things into a single argument.

WARNING:  This change breaks backward compatibility for older applicaitons based on cmd2.  To change the behavior to the way it used to be, add the following code to the __init__() method of our class derived from cmd2.Cmd:
    cmd2.set_use_arg_list(False)

This change really does make it easier for developers new to using cmd2 however.  It is to the point where I create all custom commands with @options, even if I use an empty list for the options because the argument parsing is just much better this way.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now by default all @options commands get passed a list of argument strings instead of a single argument string.

This is a much easier and more robust behavior to deal with.  Additionally, command-line arguments are intelligently separated based on location of quotes to group things into a single argument.

WARNING:  This change breaks backward compatibility for older applicaitons based on cmd2.  To change the behavior to the way it used to be, add the following code to the __init__() method of our class derived from cmd2.Cmd:
    cmd2.set_use_arg_list(False)

This change really does make it easier for developers new to using cmd2 however.  It is to the point where I create all custom commands with @options, even if I use an empty list for the options because the argument parsing is just much better this way.
</pre>
</div>
</content>
</entry>
</feed>
