| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
- Since path_complete got moved outside of cmd2.Cmd and is now a function instead of a method, need to do partial argument binding with functools.partial() instead of functools.partialmethod()
|
| |
|
|
| |
Removed usage of and reference to attributes and commands which have now been removed.
|
| |
|
|
| |
descriptive
|
| |
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
command completion
|
| |
|
|
|
|
| |
The last two arguments (err and war) are now optional.
Only the 1st argument (out) is required.
err and war default to empty strings.
|
| | |
|
| |
|
|
|
|
| |
Added the pirate8.py example from Catherine's PyCon2010 talk as pirate.py with some cleanups done.
Added an example of a complete_* method for command argument completion to the python_scripting.py example.
|
|
|
be achieved via the py command and python scripts.
|