diff options
| author | Todd Leonhardt <tleonhardt@gmail.com> | 2017-06-13 14:49:22 -0400 |
|---|---|---|
| committer | Todd Leonhardt <tleonhardt@gmail.com> | 2017-06-13 14:49:22 -0400 |
| commit | 34c4f3ce4b778d95a67a7d66ed98682ba7464f67 (patch) | |
| tree | d6f20d06f80c7dede07963133a7a48bb9484f2fb /tests | |
| parent | 0af8018cdce37e40719e3f6c4023e9525b1e69de (diff) | |
| download | cmd2-git-34c4f3ce4b778d95a67a7d66ed98682ba7464f67.tar.gz | |
Added new pyscript command
This command is explicitly for running Python script files within an embedded Python interpreter.
The advantages over the py command with "run" are:
- Tab-completion of file system paths is supported
- Command-line arguments can be passed to the Python script
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conftest.py | 4 | ||||
| -rw-r--r-- | tests/test_transcript.py | 5 | ||||
| -rw-r--r-- | tests/transcript.txt | 5 |
3 files changed, 8 insertions, 6 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 41bd007a..77f525f7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,8 +15,8 @@ import cmd2 # Help text for base cmd2.Cmd application BASE_HELP = """Documented commands (type help <topic>): ======================================== -_relative_load edit history pause quit save shell show -cmdenvironment help load py run set shortcuts +_relative_load edit history pause pyscript run set shortcuts +cmdenvironment help load py quit save shell show """ # Help text for the history command diff --git a/tests/test_transcript.py b/tests/test_transcript.py index b193a20d..5ac7d6fd 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -106,8 +106,9 @@ def test_base_with_transcript(_cmdline_app): Documented commands (type help <topic>): ======================================== -_relative_load edit history orate py run say shell show -cmdenvironment help load pause quit save set shortcuts speak +_relative_load help orate pyscript save shell speak +cmdenvironment history pause quit say shortcuts +edit load py run set show (Cmd) help say Repeats what you tell me to. diff --git a/tests/transcript.txt b/tests/transcript.txt index d0fd86a6..582f08cb 100644 --- a/tests/transcript.txt +++ b/tests/transcript.txt @@ -2,8 +2,9 @@ Documented commands (type help <topic>): ======================================== -_relative_load edit history orate py run say shell show -cmdenvironment help load pause quit save set shortcuts speak +_relative_load help orate pyscript save shell speak +cmdenvironment history pause quit say shortcuts +edit load py run set show (Cmd) help say Repeats what you tell me to. |
