Cmdln

Latest version: v2.0.0

Safety actively analyzes 619494 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

2.0.1

(nothing yet)

2.0.0

Added support for Python 3 (test suite fully passing). Thanks
Stuart Axon (https://github.com/stuaxo) for some of this work!

1.3.1

- [30, first commit only] Allow dynamic setting of `self.prompt` and have it
update. By <https://github.com/hfeeki>.

1.3.0

(*LONG* hiatus from working on this module.)

- Change `self.postoptparse()` hook handling to use the retval value. If it
is none-zero (or non-None), then `Cmdln.main()` processing exits. This
allows a Cmdln subclass to issue a starter command.

For example, the following "Foo" shell will start by running the "init"
subcmd. If that fails (returns non-zero), then `foo.main()` will
return right away, instead of entering the REPL loop.

class Foo(cmdln.Cmdln):
def postoptparse(self):
...
return self.cmd(['init'])

def do_init(self, subcmd, opts):
...

foo = Foo()
foo.main()


- Fix tab-completion on Mac with Python builds that build against editline
where `readline.parse_and_bind` have different syntax.

1.2.0

- Issue 3: Raise upper bound width for left column in "Commands" and "help
topics" lists in help output to 30. Also fix buglet in that column
formatting.
- Issue 7: add `man_sections_from_cmdln(...)` for generating decent man page
content automatically from a `Cmdln` subclass instance. See
ManPageGeneration for an overview.

1.1.3

- Stop using `string.whitespace` because it can be an 8-bit string with
non-ASCII chars in it, leading to potential `UnicodeDecodeError`s. See
Komodo Bug 81316.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.