Shortcut functions for shell scripting on Python 3.7+
Project description
#!/usr/bin/env python3.7
from shell_scripting import run, shell, shell_list
run("date | sed s/2018/2019/ > test.out")
print(shell("env | grep USER").stdout.split("\n"))
print(shell("cat /root/file"))
r = shell("cat /root/file")
print(
f"""\
args: {r.args}
returncode: {r.returncode}
stdout: {r.stdout}
stderr: {r.stderr}\
""",
end="",
)
for x in shell_list("env"):
print(x)
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
shell-scripting-0.0.4.tar.gz
(1.4 kB
view details)
File details
Details for the file shell-scripting-0.0.4.tar.gz
.
File metadata
- Download URL: shell-scripting-0.0.4.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
81e62cea52ea585356723a1aae7e31d99eeea657fdc557cdf5a09be59a99893b
|
|
MD5 |
d0ab4febdd4315b18f3fb5dd1ef610ab
|
|
BLAKE2b-256 |
7efa4e317008132ecd2f76ef7fd7caf5d5359533023c109f6fbee68213870e88
|