summaryrefslogtreecommitdiff
path: root/cmd2/utils.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Removing support for wrapping binary streams since cmd2 assumes stdout will ↵Kevin Van Brunt2019-04-251-10/+29
| | | | be a text stream in all of its code like poutput()
* Clearing bytearray instead of creating a new objectKevin Van Brunt2019-04-111-1/+1
|
* Fixed issue where pointer to bytearray was being returned instead of copied ↵Kevin Van Brunt2019-04-111-1/+1
| | | | bytes
* Fixed minor grammatical errorTodd Leonhardt2019-04-031-1/+1
|
* Attempt to fix unit testsTodd Leonhardt2019-04-021-2/+6
|
* Added some unit tests for ProcReader and ContextFlag utility classesTodd Leonhardt2019-04-021-1/+0
|
* Fix flake8 warningTodd Leonhardt2019-04-021-2/+0
|
* Started addressing my PR commentsTodd Leonhardt2019-04-021-11/+32
|
* Renamed stuff and removed unneeded KeyboardInterrupt protectionKevin Van Brunt2019-03-271-13/+8
|
* Made ContextFlag reentrantKevin Van Brunt2019-03-241-9/+12
|
* Forward SIGINT to current pipe process instead of terminating it. This is ↵Kevin Van Brunt2019-03-231-0/+5
| | | | | | consistent with our do_shell() command, ppaged() command, and other shells.
* Added protection from SIGINT when in a critical section of codeKevin Van Brunt2019-03-221-8/+34
|
* Changed StdSim byte buffer into a bytearrayKevin Van Brunt2019-03-211-1/+1
|
* Removed unused importKevin Van Brunt2019-03-201-1/+0
|
* Terminate pipe processes instead of sending them SIGINTsKevin Van Brunt2019-03-201-3/+3
|
* Not running command if redirection failsKevin Van Brunt2019-03-201-3/+3
|
* Handled issue where nested pipe processes were not being closed in the right ↵Kevin Van Brunt2019-03-201-8/+14
| | | | order upon SIGINT events
* Updated ppaged to not use self.pipe_procKevin Van Brunt2019-03-201-0/+4
|
* Simiplified codeKevin Van Brunt2019-03-201-5/+8
|
* Updated ProcReader to determine which of the process streams are pipesKevin Van Brunt2019-03-201-6/+14
|
* Only capturing Popen output when stdout is a StdSim objectKevin Van Brunt2019-03-201-4/+8
|
* Fixed issue where remaining bytes were not being readKevin Van Brunt2019-03-201-9/+9
|
* Added ProcReader class to capture output of a Popen processKevin Van Brunt2019-03-201-22/+93
|
* Converted dynamic class attributes to instance attributesTodd Leonhardt2019-03-141-0/+15
| | | | | | | | | | | | | | | | | The following attritubes which are intended to be dynamically settable at runtime are now instance attributes: - colors - continuation_prompt - debug - echo - editor - feedback_to_output - locals_in_py - quiet - timing - settable Also: - Moved code for finding a default editor to a function in utils and set a new DEFAULT_EDITOR class attribute with the return value of that
* Cleaned up some PyCharm warningsTodd Leonhardt2019-03-131-0/+1
|
* Replaced StdSim.__store_output with StdSim.pause_storageKevin Van Brunt2019-03-091-14/+3
|
* Added way to turn off storing stdout and stderr in StdSimKevin Van Brunt2019-03-061-22/+36
|
* Fixed a lot of warningsKevin Van Brunt2019-03-011-3/+3
|
* Echoing string data directly to inner_stream instead of inner_stream.buffer ↵Kevin Van Brunt2019-01-241-6/+5
| | | | to make sure line buffering is respected
* Renamed display_width to ansi_safe_wcswidthKevin Van Brunt2018-11-161-2/+3
|
* Added wrapper for wcswidth that removes ansi escape charactersKevin Van Brunt2018-11-151-0/+11
|
* Fixed error where an inner stream like StringIO doesn't have a buffer attribute.Kevin Van Brunt2018-10-091-2/+8
|
* Updated docstringKevin Van Brunt2018-10-031-2/+2
|
* Made encode and error class members of StdSimKevin Van Brunt2018-10-031-20/+20
|
* Fixed error where binary data was crashing getvalue. Added accessor methods ↵Kevin Van Brunt2018-10-031-13/+27
| | | | for retrieving StdSim contents as bytes.
* Removed unneeded escapes in regular expressionsKevin Van Brunt2018-09-281-1/+1
|
* Addressing code review commentsKevin Van Brunt2018-09-271-1/+1
|
* Made function to unquote redirection charactersKevin Van Brunt2018-09-261-0/+12
|
* Backing up macro command workKevin Van Brunt2018-09-241-3/+3
|
* StdSim write methods now raise a TypeError exception if passed the wrong typeTodd Leonhardt2018-09-241-0/+4
| | | | | Also: - Added explicit unit tests for StdSim to test_utils.py
* Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-0/+54
| | | | | | | | | 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
* Removed remaining type hints in docstringsKevin Van Brunt2018-09-211-1/+1
|
* Simplified functions moreKevin Van Brunt2018-09-211-5/+7
|
* Added unit tests for new utility functions and fixed a commentTodd Leonhardt2018-09-211-1/+1
|
* Refactored do_setKevin Van Brunt2018-09-211-1/+23
|
* Add natural sorting (sorting case insensitively as well as numerically)Lance Starr2018-09-191-1/+47
|
* Addeded utility function for combining unicode normalization and casefolding ↵Todd Leonhardt2018-08-021-6/+16
| | | | | | | | into a single step Also: - Updated the alphabetical sort utility function to use this - Started adding explicit unit tests for functions in utils.py
* Added alphabetical_sort() functionKevin Van Brunt2018-08-011-0/+9
|
* Added matches_sorted member to support custom sorting order of ↵Kevin Van Brunt2018-08-011-0/+13
| | | | | | | tab-completion matches Made all sorting alphabetical Fixed case where extra slash was printing when tab completing users on Windows
* Merge branch 'master' into historyTodd Leonhardt2018-07-121-16/+0
|\