commit 1b21c24d1a6ba02fe1eea191379eb6c9811657fe Merge: 0d357a9 f2cabcd Author: Damian Johnson atagar@torproject.org Date: Mon May 5 18:03:46 2014 -0700
Interpretor prompt
Arm's 1.4.5 release included an interpretor panel that allowed raw control port access with usability improvements like...
* tab completion * history by pressing up/down * terminal coloring to improve readability * irc-style functions such as '/help' and '/info'
This was pretty slick but rarely used, and is being removed from the next arm release.
The trouble isn't with the feature, but rather the audience. Raw control port access is useful to learn about tor's controller interface and debug during development. This didn't match arm's audience, who are primarily relay operators and power users. However, it's *perfect* for Stem!
This is a rewritten version of arm's interpretor...
https://gitweb.torproject.org/arm.git/blob/e249dc8f5c4c282326324161cf8421f94...
Functionally this is the same as arm's, but is much more modular and better tested. Pending improvements I plan include...
* tutorial to introduce new stem users to the prompt * option to get a python prompt (similar to our old 'prompt' command)
prompt | 23 +-- prompt_old | 19 ++ stem/interpretor/__init__.py | 85 +++++++++ stem/interpretor/arguments.py | 92 ++++++++++ stem/interpretor/autocomplete.py | 112 ++++++++++++ stem/interpretor/commands.py | 319 +++++++++++++++++++++++++++++++++ stem/interpretor/help.py | 142 +++++++++++++++ stem/interpretor/settings.cfg | 259 ++++++++++++++++++++++++++ stem/response/__init__.py | 1 + stem/util/conf.py | 51 +++++- stem/util/term.py | 3 +- test/settings.cfg | 4 + test/unit/interpretor/__init__.py | 39 ++++ test/unit/interpretor/arguments.py | 57 ++++++ test/unit/interpretor/autocomplete.py | 112 ++++++++++++ test/unit/interpretor/commands.py | 216 ++++++++++++++++++++++ test/unit/interpretor/help.py | 54 ++++++ 17 files changed, 1568 insertions(+), 20 deletions(-)
tor-commits@lists.torproject.org