<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/cmd2-git.git/examples/python_scripting.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>Cleanup of documentation and examples</title>
<updated>2018-01-17T14:07:40+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-17T14:07:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=1da904585db4cd1e77c312190149daa946366fa0'/>
<id>1da904585db4cd1e77c312190149daa946366fa0</id>
<content type='text'>
Removed usage of and reference to attributes and commands which have now been removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removed usage of and reference to attributes and commands which have now been removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Renamed new decorator to @with_argparser_and_unknown_args to make it more descriptive</title>
<updated>2018-01-15T17:38:48+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-15T17:38:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=1f18c942fc3babf3c2183fdc2331d405d6810dc8'/>
<id>1f18c942fc3babf3c2183fdc2331d405d6810dc8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Modified examples still using @options to import make_option from optparse</title>
<updated>2018-01-15T07:03:00+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2018-01-15T07:03:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=b4e6fc40b0af32aabed00635a6402d18620760c2'/>
<id>b4e6fc40b0af32aabed00635a6402d18620760c2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add screenshot to front page</title>
<updated>2017-07-03T19:04:46+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-07-03T19:04:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=4ebab8889cc8546bf19bbd2981b2231547b45757'/>
<id>4ebab8889cc8546bf19bbd2981b2231547b45757</id>
<content type='text'>
Also:
- Updated pythong_scripting.py example to show how to colorize text
- Updated contributing.md to show how to run code coverage in parallel using python-xdist and -nauto
- Updated contributing.md to talk more about looking at unit test results within the PR
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also:
- Updated pythong_scripting.py example to show how to colorize text
- Updated contributing.md to show how to run code coverage in parallel using python-xdist and -nauto
- Updated contributing.md to talk more about looking at unit test results within the PR
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved example scripts from examples to examples/scripts directly</title>
<updated>2017-06-21T10:54:58+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-06-21T10:54:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=98b57f380d4bedbbe9a0eea174075f8c62aea6bd'/>
<id>98b57f380d4bedbbe9a0eea174075f8c62aea6bd</id>
<content type='text'>
Cleaned up the examples directory by adding a scripts subdirectory.

This makes it a bit clearer which Python files are example cmd2 applications and which are example Python scripts for use with the pyscript command.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleaned up the examples directory by adding a scripts subdirectory.

This makes it a bit clearer which Python files are example cmd2 applications and which are example Python scripts for use with the pyscript command.
</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>
<entry>
<title>Updated documentation and examples</title>
<updated>2017-06-15T00:03:05+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-06-15T00:03:05+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=63d5be91462d897d8fb37b31802dab464d879c87'/>
<id>63d5be91462d897d8fb37b31802dab464d879c87</id>
<content type='text'>
Added information related to the new pyscript command.

The old way of running Python scripts via "py run()" should be considered deprecated.  The new "pyscript" command
is superior in two significant ways:
1) It supports tab-completion of file system paths
2) It allows the user to pass command-line arguments to scripts
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added information related to the new pyscript command.

The old way of running Python scripts via "py run()" should be considered deprecated.  The new "pyscript" command
is superior in two significant ways:
1) It supports tab-completion of file system paths
2) It allows the user to pass command-line arguments to scripts
</pre>
</div>
</content>
</entry>
<entry>
<title>Updated an example, features, and changes based on new support for path and command completion</title>
<updated>2017-05-18T01:23:44+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>todd.leonhardt@gmail.com</email>
</author>
<published>2017-05-18T01:23:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=d9de55267102f9b5d389e20917edee4b5f5e7097'/>
<id>d9de55267102f9b5d389e20917edee4b5f5e7097</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved the CmdResult namedtuple subclass</title>
<updated>2017-03-14T20:53:22+00:00</updated>
<author>
<name>Todd Leonhardt</name>
<email>tleonhardt@gmail.com</email>
</author>
<published>2017-03-14T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cmd2-git.git/commit/?id=28eba1722b12f1a270fffd9a8596044c5be6e7cd'/>
<id>28eba1722b12f1a270fffd9a8596044c5be6e7cd</id>
<content type='text'>
The last two arguments (err and war) are now optional.
Only the 1st argument (out) is required.
err and war default to empty strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The last two arguments (err and war) are now optional.
Only the 1st argument (out) is required.
err and war default to empty strings.
</pre>
</div>
</content>
</entry>
</feed>
