A tool for keeping track of Python's interactions with the shell.
Project description
shell-logger
The shell-logger
Python package allows you to interact with the shell, while
logging various metadata, statistics, and trace information. Any time you're
tempted to write your own wrapper around things like subprocess.Popen()
or
subprocess.run()
, consider using shell_logger.ShellLogger.log()
instead.
If you're familiar with the Unix script command, this is similar in
principle, but with substantially more functionality. If you're familiar with
Python's logging module, the motivation is similar, but this intends
to capture what's happening in the shell rather than in Python itself.
Installation
To get up and running with shell-logger
, simply:
python3 -m pip install shell-logger-sandialabs
Usage
Once the package is installed, you can simply
from shell_logger import ShellLogger
sl = ShellLogger("Title of Log File")
sl.log("Execute my first command in the shell.", "echo 'Hello World'")
sl.finalize()
For more detailed usage and API information, please see our documentation.
Where to Get Help
If you're having trouble with shell-logger
, or just want to ask a question,
head on over to our issue board. If a quick search doesn't yield
what you're looking for, feel free to file an issue.
Contributing
If you're interested in contributing to the development of shell-logger
, we'd
love to have your help :grinning: Check out our
contributing guidelines for how to get started.
Past contributors include:
License & Copyright
See LICENSE.md and COPYRIGHT.md.
Credits
Special thanks to the EMPIRE project for investing in the initial development of this tool, and the GMS project for serving as a second user and contributing to its clean-up.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for shell_logger_sandialabs-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 266f29c04bd3b7e43f8e7c73df2bafa4383005e9d7be149fb9f4114c1698ebd9 |
|
MD5 | d72964e4909e4217399242ae706e7ba4 |
|
BLAKE2b-256 | 3d10ae909cf33c40058a3857bf8fcb1f3f12e21489de66d3445210a2c0e10fb3 |
Hashes for shell_logger_sandialabs-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7673078a39bc792d318975c87e2a458f67f9550a6702d31ef41ed18768eaa4c5 |
|
MD5 | 5ca683cbdcbab58291c008146089db46 |
|
BLAKE2b-256 | 84baaea5e19c1cb839ba35e446221e7e289c96e064dbe3d40d0df51d0aa6120b |