| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |\
| |
| | |
Doctest gone
|
| | | |
|
| |/
|
|
| |
Since all doctests were converted to pytest unit tests in a previous commmit, this commit just removes the inclusion and usage of doctest. Now if cmd2.py is run as a main application, it just starts a bare-bones cmd2.Cmd() application with only built-in functionality instead of running the doctests which no longer exist.
|
| |\
| |
| | |
Changed EmptyStatement behavior so postparsing_postcmd() always runs.
|
| |/
|
|
|
|
| |
postparsing_postcmd() always runs now, even after an empty statement.
This is to enable features such as updating the prompt due to notifications from a background thread even when the user just presses enter.
|
| | |
|
| | |
|
| |\
| |
| | |
Added optional ipy command
|
| | | |
|
| |/
|
|
|
|
| |
If IPython is installed AND the __init__ initilizer is passed a "use_ipython" keyword argument set to "True", then and "ipy" command will be present.
This ipy command starts an interactive IPython shell embedded within the cmd2 application. This IPython shell has access to all of the local variables (e.g. self), but any modifications made within it will NOT persist once it is exited. This IPython shell doesn't have tight integration with the Python interpreter running the cmd2 application like the Python interpreter available with the "py" command. However, due to features such as tab-completion and built-in help, the IPython shell is a lot more efficient for developers to use to debug their cmd2 applications - the introspection on self is extremely useful for getting to the bottom of thorny debugging problems.
|
| | |
|
| | |
|
| |
|
|
| |
This concludes the fix for Issue #43.
|
| |\
| |
| | |
Converted most doctests to pytest
|
| | |
| |
| |
| | |
Partial fix for Issue # 43
|
| |/
|
|
|
|
| |
Done with first stage. Still a lot more parsing tests to convert.
It turns out the original problem wasn't a Python 2 vs Python 3 problem, but the fact that pyparsing changed the way the ParseResults.dump() command outputs strings - in version 2.1.10 it switched to putting strings in quotes.
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Improve the help text of a couple commands
|
| |/ |
|
| |\
| |
| | |
Deal with select index out of range.
|
| |/
|
|
| |
This is a fix for issue #17
|
| |\
| |
| | |
Added member boolean flag to disable output redirection and piping.
|
| |/
|
|
|
|
| |
This addresses Issue #15.
Also added a unit test for this new feature and display of it's status in the cmdenvironment command.
|
| |\
| |
| | |
Add option to prevent processing of CLI args.
|
| | |
| |
| |
| | |
Addressed Issue #14.
|
| |/
|
|
| |
Now the preloop() runs and the intro prints prior to executing any commands supplied as arguments on the command line.
|
| | |
|
| | |
|
| |
|
|
| |
Also reorganized the GitHub README.rst front-page.
|
| |
|
|
|
|
| |
- Fixed optparse links
- Added note about plans to replace optparse with argparse
- Added subsection about the functions which control argument parsing for commands with flags
|
| |
|
|
|
|
|
|
|
|
|
| |
Sphinx documenation updates, including:
- Extensively re-wrote the "alternatives to cmd2" section as it was many years out of date
- Reworded a few humorous sections in an attempt to be more professional
- Removed reference to command synonyms/aliases which no longer exist
- Added more detail in a couple places
- Minor rewording and bugfixes throughout
Also added a note to cmd2.py about the expected values for doctest only working for Python 2.7.
|
| |
|
|
|
|
| |
Separated printing of help from docstrings for several commands.
This is to separate the in-console help from the Sphinx documentation autodoc help.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Also:
- Added locals_in_py to settable parameters to match documentation.
- Added pycon2010 slides back into doc build since they are referenced with :doc:
- Fixed some references in the documentation
- Updated unit tests accordingly
|
| |
|
|
| |
Also fixed references to the Script files section.
|
| |
|
|
| |
The docs now use the custom HTML theme from Read the Docs so that when they are built locally they look the same as they will at https://cmd2.readthedocs.io/en/latest/
|
| |\
| |
| | |
Perror improvement
|
| | | |
|
| |/ |
|
| |\
| |
| | |
Parsing improvements for commands using the options decorator
|
| | |
| |
| |
| | |
arguments for @options commands.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
In order to fix a problem with do_load() trying to do more than it should, refactored to move the preloop() and postloop() calls so they are not called when loading a script.
This is so a script is simply a way to automate running several commands in a row and makes it safe for preloop() to create threads, connect to servers, and do other stateful things.
|