ntermqt 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nterm/__main__.py +48 -0
- nterm/parser/__init__.py +0 -0
- nterm/parser/api_help_dialog.py +607 -0
- nterm/parser/ntc_download_dialog.py +372 -0
- nterm/parser/tfsm_engine.py +246 -0
- nterm/parser/tfsm_fire.py +237 -0
- nterm/parser/tfsm_fire_tester.py +2329 -0
- nterm/scripting/__init__.py +8 -6
- nterm/scripting/api.py +926 -19
- nterm/scripting/repl.py +406 -0
- nterm/scripting/repl_interactive.py +418 -0
- nterm/session/local_terminal.py +1 -0
- {ntermqt-0.1.4.dist-info → ntermqt-0.1.6.dist-info}/METADATA +7 -5
- {ntermqt-0.1.4.dist-info → ntermqt-0.1.6.dist-info}/RECORD +17 -10
- nterm/examples/basic_terminal.py +0 -415
- {ntermqt-0.1.4.dist-info → ntermqt-0.1.6.dist-info}/WHEEL +0 -0
- {ntermqt-0.1.4.dist-info → ntermqt-0.1.6.dist-info}/entry_points.txt +0 -0
- {ntermqt-0.1.4.dist-info → ntermqt-0.1.6.dist-info}/top_level.txt +0 -0
nterm/scripting/__init__.py
CHANGED
|
@@ -15,11 +15,6 @@ Quick Start (IPython):
|
|
|
15
15
|
api.credentials() # List credentials
|
|
16
16
|
|
|
17
17
|
api.help() # Show all commands
|
|
18
|
-
|
|
19
|
-
Quick Start (CLI):
|
|
20
|
-
nterm-cli devices
|
|
21
|
-
nterm-cli search leaf
|
|
22
|
-
nterm-cli credentials --unlock
|
|
23
18
|
"""
|
|
24
19
|
|
|
25
20
|
from .api import (
|
|
@@ -29,9 +24,14 @@ from .api import (
|
|
|
29
24
|
get_api,
|
|
30
25
|
reset_api,
|
|
31
26
|
)
|
|
27
|
+
from nterm.scripting.repl import REPLPolicy, NTermREPL
|
|
28
|
+
from nterm.scripting.repl_interactive import add_repl_to_api
|
|
32
29
|
|
|
33
30
|
# Convenience: pre-instantiated API
|
|
34
|
-
api = get_api()
|
|
31
|
+
api = get_api() # <-- This FIRST
|
|
32
|
+
|
|
33
|
+
# Make api.repl() available
|
|
34
|
+
add_repl_to_api(api) # <-- Then this
|
|
35
35
|
|
|
36
36
|
__all__ = [
|
|
37
37
|
"NTermAPI",
|
|
@@ -40,4 +40,6 @@ __all__ = [
|
|
|
40
40
|
"get_api",
|
|
41
41
|
"reset_api",
|
|
42
42
|
"api",
|
|
43
|
+
'REPLPolicy',
|
|
44
|
+
'NTermREPL'
|
|
43
45
|
]
|