Skip to main content

Various command line interface utilities.

This package requires Python 2, at least 2.5.

tl.cmd: an enhanced command shell

tl.cmd.Cmd is a command shell based on Python’s cmd.Cmd that adds some generic usability features, some of them only of interest to developers.

  • Exceptions are caught instead of aborting the command loop. The traceback is stored for subsequent introspection by the postmortem debugger. The debugger is run by the postmortem command.

  • The python command runs a Python shell to access the command interpreter directly.

  • End-of-file sent by the terminal quits the command loop.

  • Empty input lines are ignored instead of repeating the previous command.

  • Commands may be abbreviated as long as abbreviations are unambiguous.

  • When using tab completion, the cursor is positioned more conveniently.

  • Online help for commands is generated from the docstrings of the do_* methods that implement them where no help_* methods exist.

tl.cli.edit: text editing

tl.cli.edit.edit(text, editor=None, file_encoding=None):

Runs the user’s favourite text editor (or vi) on a temp file containing the text string, then reads it back in and returns the edited content.

tl.cli.page: paging through text

tl.cli.page.page(text, pager=None):

Runs the user’s favourite pager (or more) on a text string or stream which is sent to the pager’s standard input.

tl.cli.page.page_file(path, pager=None):

Runs the user’s favourite pager (or more) on a file whose path is passed to the pager as its only argument.

Contact

This package is written by Thomas Lotze. Please contact the author at <thomas@thomas-lotze.de> to provide feedback, suggestions, or contributions.

See also <http://www.thomas-lotze.de/en/software/>.

Release files for tl.cli 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tl.cli 0.2
File Size Uploaded
tl.cli-0.2.tar.gz 13.6 kB Details

Release files / tl.cli-0.2.tar.gz

Download URL tl.cli-0.2.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f8fd0dfef07304537f5d994774df1bac9d1817c6f30155d75c779cf55f98fa66
BLAKE2b-256 checksum
How to use checksums
da5eab76992d3d63c47d6f40722e361d2307f574f491635b1974b251064bbb1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page