Source

argh / argh / helpers.py

Author Commit Message Labels Comments Date
Andy Mikhailenko
Removed redundant examples from the documentation.
Andy Mikhailenko
Added shortcut function `dispatch_commands`.
Andy Mikhailenko
Improved set_default_command(): if `parser.description` is empty and the function has a docstring, that docstring is used as the parser description.
Andy Mikhailenko
Added dispatch_command() shortcut function. Added documentation. This finally fixes #6.
Branches
6-default-command
Andy Mikhailenko
Re #6: added a basic test and the relevant code for a default command for the root parser. It seems that everything is fine but we need to check for conflicts, etc.
Branches
6-default-command
madjar
Fixed helpers.confirm not working in python3. Fixes #14.
Andy Mikhailenko
BACKWARDS-INCOMPATIBLE. Added support for Python 3.x. Dropped support for Python ≤ 2.5. Included Benjamin Peterson's library "six" to keep the code clean while Python 2.x/3.x-compatible. Updated documentation.
Andy Mikhailenko
Removed unused imports.
Andy Mikhailenko
Fixed silly bug.
Andy Mikhailenko
Removed the previously deprecated argument "intercept" in the dispatch() helper. Replaced a "magic number" with a constant in the wrap_errors() decorator.
Andy Mikhailenko
Added decorator wrap_errors(). Improved error wrapping in dispatcher. Added license headers. Bumped version.
Andy Mikhailenko
Bumped version. Small fixes in the documentation.
mel
allow using custom namespace objects:
Andy Mikhailenko
Added dispatch argument `output_file` (issue #10), deprecated argument `intercept`. Added tests.
mel
dispatch(): added 'raw_output' argument that disables whitespace/newline additions to output
Andy Mikhailenko
Fixed edge case: when no command is specified at all, just display usage info. (We should also somehow support usable command-less cases but I have no idea what they can be like.)
Andy Mikhailenko
Refactored.
Andy Mikhailenko
Improved documentation a little bit.
Andy Mikhailenko
Added patch by Mika Eloranta to subparser commands visible in the main level --help.
Andy Mikhailenko
Added bash completion for commands. Options are not yet supported. User needs to bind completion to certain script name (to be documented). Tests are provided (for internal API only).
Andy Mikhailenko
Added support for Python 2.5 (this fixes issue #5).
Andy Mikhailenko
Added a todo note.
Andy Mikhailenko
Rearranged the code. Added test for @alias decorator. Removed the previously deprecated decorator @generator.