NaughTTY
NaughTTY is a CLI tool and Python package for running commands in a pseudo-terminal.
Full documentation is published at naughtty.readthedocs.io.
Installation
NaughTTY requires Python 3.8 or later and a compatible operating system.
pip install naughtty
NaughTTY requires the host operating system to support forking and pseudo-terminals. GNU/Linux is good. At the time of writing, Windows is not.
Basic CLI usage
naughtty APP > output-with-escape-codes.txt
naughtty APP | APP-THAT-USES-ESCAPE-CODES
For example:
naughtty pipenv --help > help.txt
naughtty pipenv --help | less
Full documentation is published at naughtty.readthedocs.io.
Basic Python usage
from naughtty import NaughTTY
ntty = NaughTTY(["pipenv", "--help"])
ntty.execute()
print(ntty.output)
Usage: \033[39m\033[1mpipenv\033[39m\033[22m [OPTIONS] COMMAND [ARGS]...
\033[39m\033[1mOptions:\033[39m\033[22m
--where Output project home information.
--venv Output virtualenv information.
--py Output Python interpreter information.
--envs Output Environment Variable options.
--rm Remove the virtualenv.
--bare Minimal output.
--completion Output completion (to be executed by the
\033[33m\033[1m shell\033[39m\033[22m).
...
Full documentation is published at naughtty.readthedocs.io.
👋 Hello!
Hello! I'm Cariad Eccleston and I'm an independent/freelance software engineer. If my work has value to you, please consider sponsoring.
If you ever raise a bug, request a feature or ask a question then mention that you're a sponsor and I'll respond as a priority. Thank you!
Metadata
Release files for naughtty 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| naughtty-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for naughtty-1.0.1-py3-none-any.whl |
Release files / naughtty-1.0.1-py3-none-any.whl
| Download URL | naughtty-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
127235a0ecd8f2e5db97a271732d9ce41299f7f6d59b258e1c63d306cdb1ae35
|
|
BLAKE2b-256 checksum How to use checksums |
8310944ab91b909fab31ed842cf5f4536538259245f63d4f01eaaa8033068e16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6
|
Security for naughtty 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.