Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Renamed PyscriptBridge to PyBridge | Kevin Van Brunt | 2019-07-20 | 1 | -109/+0 |
| | |||||
* | Made last_result public and restored the initialization of it in __init__ ↵ | Todd Leonhardt | 2019-06-23 | 1 | -3/+3 |
| | | | | and associated comment | ||||
* | Restored a few attributes to be public | Todd Leonhardt | 2019-06-23 | 1 | -1/+1 |
| | |||||
* | Began work to minimize public API | Todd Leonhardt | 2019-06-15 | 1 | -1/+1 |
| | |||||
* | Updated documentation | Kevin Van Brunt | 2019-06-15 | 1 | -1/+1 |
| | |||||
* | Deprecate support for Python 3.4 and begin testing with Python 3.8 beta | Todd Leonhardt | 2019-06-14 | 1 | -7/+1 |
| | |||||
* | Updated change log and comment | Kevin Van Brunt | 2019-06-07 | 1 | -1/+1 |
| | |||||
* | Removed copyright headers from source files and updated LICENSE with current ↵ | Kevin Van Brunt | 2019-06-07 | 1 | -3/+0 |
| | | | | year | ||||
* | Removed self._should_quit from cmd2 and add logic to PyscriptBridge to ↵ | Kevin Van Brunt | 2019-06-07 | 1 | -8/+16 |
| | | | | | | return whether a command returned True for stop. Added stop to CommandResult so pyscripts can now know the return value of a command's do_* function. | ||||
* | Only enabling/disabling stdout storage in the call PyscriptBridge makes to ↵ | Kevin Van Brunt | 2019-04-23 | 1 | -5/+4 |
| | | | | | | | onecmd_plus_hooks. All nested calls to onecmd_plus_hooks keep capturing stdout to match the behavior of stdout redirection being enabled during nested commands. | ||||
* | Removed unused class member and updated comment | Kevin Van Brunt | 2019-04-10 | 1 | -3/+1 |
| | |||||
* | Pyscript now saves command output during the same period that redirection does | Kevin Van Brunt | 2019-04-10 | 1 | -0/+4 |
| | |||||
* | No longer appending \n to commands run by PyscriptBridge. This messes up ↵ | Kevin Van Brunt | 2019-03-19 | 1 | -2/+1 |
| | | | | | | redirection parsing of non-multiline commands. | ||||
* | Cleaned up some PyCharm warnings | Todd Leonhardt | 2019-03-13 | 1 | -0/+1 |
| | |||||
* | Replaced StdSim.__store_output with StdSim.pause_storage | Kevin Van Brunt | 2019-03-09 | 1 | -3/+4 |
| | |||||
* | Added way to turn off storing stdout and stderr in StdSim | Kevin Van Brunt | 2019-03-06 | 1 | -10/+27 |
| | |||||
* | Fixed a lot of warnings | Kevin Van Brunt | 2019-03-01 | 1 | -1/+1 |
| | |||||
* | Removed ability to call commands as if they were functions in pyscript (e.g. ↵ | Kevin Van Brunt | 2019-02-28 | 1 | -281/+25 |
| | | | | app.help()) | ||||
* | Fix flake8 issues | Todd Leonhardt | 2018-12-06 | 1 | -2/+1 |
| | | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined | ||||
* | Updated comment | Kevin Van Brunt | 2018-11-30 | 1 | -4/+4 |
| | |||||
* | Refactored | Kevin Van Brunt | 2018-10-13 | 1 | -26/+29 |
| | |||||
* | Argparse commands called as methods of PyscriptBridge now go through ↵ | Kevin Van Brunt | 2018-10-12 | 1 | -14/+15 |
| | | | | onecmd_plus_hooks | ||||
* | Non-argparse commands called as methods of PyscriptBridge now go through ↵ | Kevin Van Brunt | 2018-10-12 | 1 | -1/+6 |
| | | | | onecmd_plus_hooks | ||||
* | Fixed ArgparseFunctor to allow flag looking tokens in REMAINDER sections | Kevin Van Brunt | 2018-10-10 | 1 | -2/+4 |
| | |||||
* | Added code to handle -- in argparse completer | Kevin Van Brunt | 2018-10-10 | 1 | -3/+3 |
| | |||||
* | Added ability for argcompleter to determine difference between flag and ↵ | Kevin Van Brunt | 2018-10-09 | 1 | -6/+7 |
| | | | | negative number | ||||
* | Use argparser to determine if a token looks like an optional | Kevin Van Brunt | 2018-10-07 | 1 | -17/+2 |
| | |||||
* | Allowing negative number values when checking for optional prefix characters | Kevin Van Brunt | 2018-10-07 | 1 | -5/+6 |
| | |||||
* | Added check to prevent optional value strings from being accepted as positionals | Kevin Van Brunt | 2018-10-06 | 1 | -4/+23 |
| | |||||
* | Quoting strings with utility function | Kevin Van Brunt | 2018-10-06 | 1 | -5/+3 |
| | |||||
* | Fixed unit test failures and addressed code review comments | Todd Leonhardt | 2018-10-06 | 1 | -5/+6 |
| | |||||
* | Merge remote-tracking branch 'origin/master' into argparse_remainder | Eric Lin | 2018-10-06 | 1 | -4/+11 |
|\ | |||||
| * | Simplified code | Kevin Van Brunt | 2018-10-05 | 1 | -1/+1 |
| | | |||||
| * | No longer using stderr and self.data together to determine truthiness of a ↵ | Kevin Van Brunt | 2018-10-05 | 1 | -3/+10 |
| | | | | | | | | | | | | | | CommandResult. Either self.data is used or if that's not possible, then self.stderr is used. This provided applications the ability to print to stderr even if an error didn't occur. | ||||
| * | Using sub-command instead of subcommand where possible to be consistent with ↵ | Kevin Van Brunt | 2018-10-05 | 1 | -1/+1 |
| | | | | | | | | argparse | ||||
* | | Added handling of nargs=argparse.REMAINDER in both AutoCompleter and ↵ | Eric Lin | 2018-10-06 | 1 | -16/+49 |
|/ | | | | | | | | ArgparseFunctor Should correctly force all subsequent arguments to go to the REMAINDER argument once it is detected. Re-arranged the command generation in ArgparseFunctor to print flag arguments before positionals Also forces the remainder arguments to always be last. | ||||
* | Tweaked some error strings | Kevin Van Brunt | 2018-10-03 | 1 | -2/+2 |
| | |||||
* | Returned cmd_echo default to False except when running a Python command at ↵ | Kevin Van Brunt | 2018-10-02 | 1 | -1/+1 |
| | | | | the CLI | ||||
* | Improved documentation | Kevin Van Brunt | 2018-10-02 | 1 | -3/+5 |
| | |||||
* | Default cmd_echo to True in PyscriptBridge so things like 'py app.help()' ↵ | Kevin Van Brunt | 2018-10-02 | 1 | -5/+5 |
| | | | | will show output | ||||
* | Changed PyscriptBridge.__getattr__ to raise Attribute error for non-commands | Kevin Van Brunt | 2018-10-02 | 1 | -2/+6 |
| | |||||
* | Added echo parameter for calling commands from Pyscript | Kevin Van Brunt | 2018-10-02 | 1 | -7/+16 |
| | | | | Documented py command's parsing limitations | ||||
* | Refactored functions to use cmd2.cmd_func() | Kevin Van Brunt | 2018-09-28 | 1 | -15/+15 |
| | |||||
* | Fixed several hack classes build to simulate file descriptors | Todd Leonhardt | 2018-09-23 | 1 | -33/+8 |
| | | | | | | | | | Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects. This class replaced the following: - pyscript_bridge.py::CopyStream - transcript.py::OutputTrap - conftest.py::StdOut | ||||
* | Deprecated CmdResult helper class and promoted CommandResult | Todd Leonhardt | 2018-06-23 | 1 | -1/+1 |
| | | | | | | | | | | | | | | These classes are subtly different, particularly in terms of their truthiness. CmdResult - attributes: out, err, war - truthy: if err is falsy CommandResult - attributes: stdout, stderr, data - truthy: if err is falsy AND data is not None So CmdResult was oriented to provide essentially info, error, and warning messages to the user (typically as stirngs), whereas CommandResult is geared towards providing info and error messages to the user as strings in addition to data to the user in a command-specific format which is arbitrary other than it should never be None if the command succeeds. | ||||
* | Added yet more type hinting | Todd Leonhardt | 2018-06-10 | 1 | -2/+2 |
| | |||||
* | Working on improving type hinting | Todd Leonhardt | 2018-06-09 | 1 | -2/+3 |
| | | | | | Also: - Refactored perror() to remove a rarely used optional argument which was unecessary | ||||
* | Changed some unit tests to use pytest-mock instead of mocker/monkeypatch ↵ | Eric Lin | 2018-05-19 | 1 | -2/+2 |
| | | | | | | | because they were failing for me. Added detection of ==SUPPRESS== in subcommand group names to avoid printing it in the help hint. Added some examples to tab_autocompletion to demonstrate how to tie in to cmd2 path_complete | ||||
* | Added type hinting. | Eric Lin | 2018-05-18 | 1 | -10/+9 |
| | |||||
* | Suppresses stdout and stderr output by default when calling an application ↵ | Eric Lin | 2018-05-17 | 1 | -15/+31 |
| | | | | | | | command from pyscript. Added support for tab completing application commands in ipython shell Updated unit tests scripts to set cmd_echo to True to validate command output. |